Mac OS X Server Setup

Your IP address is :

/b>/b>Internet hosting on a Mac mini is an efficient use of an energy efficient computer. The original Intel mini - the one with the white top - has an 85 watt power supply but typically uses between 20 - 25 watts when running. The newer version, introduced in 2010, uses between 11 - 20 watts. Compare that to a "normal" desktop running at about 150 watts and there are significant savings when running 7/24 as a server.

DVD drive
The older models have a built in DVD R/W which, while rarely used, is an essential item have available. If you are considering purchasing the 2010 mini Server, add the $99 MacBook Air DVD drive to your order. You will need it one night after the local Apple store has closed. (more on that later)

The oldest models have a 2 gb limit on the amount of RAM that they can have installed, but those with the Core 2 Duo chip can go to 4 gb. The 2010 model can accept up to 8 gb of RAM. For most serving, 2 gb is sufficient.

We have run minis with the 1.6 Core Solo processor, but found that the computer was constantly running at max. Right now, we're running a mix of minis with Core Duo and Core 2 Duo chips and find that the performance is pretty much equal in real world work. If you do get ahold of an older model with the Core Solo processor, swapping chips is not a big job and can be easily done in under an hour. Chips are available from a large number of sources and you shouldn't be paying more than $75. Here's an ebay search page. Look for the "T" series chips. More information is available here. The issues you need to watch for are the very tiny fan cable in the front of the computer and the sizes of the 4 screws that hold the top cage down. One is longer than the rest. Have some thermal paste on hand, and use it sparingly. More is NOT better when you are using thermal paste.

Hard Drives - Internal
Probably a good idea to install a new drive if you are going to upgrade the processor, but you won't need a huge one. You'll probably be able to get away with anything in the 100 gb range, If the prices of SSDs come down, and they are, consider going solid state. Our website server has about 100 sites on it and it's currently got only 35 gb of data on it. Regardless, a new drive will give you at least 2 or 3 years of performance and with the backups you should have, you'll be safe if it goes down on you.
The new mini Server comes with 2 internal 500 gb drives and comes from the factory with the OS on one and the other blank and ready to be setup as a Time Machine drive. This isn't an optimal situation, as your backup should be more accessible. There are a couple of strategies you can use with the second drive.
(Addition, Jan 7 2011) Forget the original drive. Replace now with an SSD. I bought a couple, one at a Fry's in California and another here in Toronto. Paid less than $100 for each 64 gb SSD. Speed increase, lower heat. Do it at setup and save on the downtime.

  1. First, download SuperDuper and pay for it. Register it before you go any further. Use the setup instructions way down the page and use that second drive as a full time backup of the main drive, always ready to go.
  2. Second, you can raid the two drives in the new "metal" mini server, using the Apple Disk Utility. DO NOT USE APPLE'S RAID SOFTWARE. YOU WILL REGRET IT! It will crash on you, and at the worst time. Use anything else.
    You have a couple of options
    • You can mirror them, so the copy is made constantly. Not faster, but somewhat safer.
    • You can combine them, using the "Striped" method where your 2 X 500 gb drives become one 1000gb drive that runs twice as fast. This larger drive is faster than the single drives and data is written to both drives. We like this method best as the drive speed is enhanced

Hard Drives - External
Apple introduced Time Machine with Leopard (OS 10.5) and it's a great backup system in it's own right, but on a server it does not copy all the config files properly. We have external drives on all our servers and do run Time Machine and other backup systems. Get an external that has either a fan or a heavy metal case for heat dissipation. Heat kills drives. You can always partition the drive into smaller chunks and use it for more SuperDuper spots (more later).

It's nice to have a monitor on a mini running as a server, but there's no need to have a dedicated monitor for each of your servers. A USB KVM switch allows you to share the screen among a number of computers and saves on desk space. TrendNet makes some decent cheap KVMs. Make sure that they come with ALL the cables, as those can be expensive. The monitor itself can be just about any monitor you have available.

Older minis are equipped with 10/100 Ethernet, which is fine for serving websites, as the web barely uses the 10 mb speed. If you are serving in an office and can upgrade the network to GigaBit (10/100/1000), then you should look at the minis sold after January 2010. You will notice the difference, especially when multiple clients are using the server.

There is only one Mac OS. It's a version of UNIX that includes all the serving software that every other UNIX computer includes. The difference between the Server and the "normal" version is the Server's user interface which is superb. If you are going to be hosting websites, you don't need the Server version though, it just adds a level of complexity to the process that is not required. For serving files in an office environment, Server is really the way to go. It plays very nicely with the rest of the kids in the office, handling Mac or Windows clients with ease. All kinds of controls for access and while the learning curve is steep, as in any server environment, you shouldn't have too many worries when doing your setup. Snow Leopard added a simple panel for simple setup, but you can still use the Sever Admin when you need to. The rest of the Software section is going to be devoted to the "normal" OS as a server.

PhP is not running on the standard OS, you need to turn it on. Methods are described here or here and a whole package, including an up to date PHP installer is found right here.

HTTPD - the config file (Edited, Nov 27 2011)
There are 2 choices when you need to configure the server. You can be brave and play with the Apache HTTPD config file, which is not exactly impossible for a first timer, so you might consider using VirtualHostingX software package that does it for you. It costs $25 US and can be simple to use. Put in the name of the domain, click the box to allow it to use the www extension, and you're running. Does it all for you.
There is an "however" though. The last server we configured, the one that this website is running on - a 2010 mini running Snow Leopard - had severe issues with VirtualHostingX. So severe that we ended up configuring the Apache config file directly. It's a bit more trouble and not easy for a first timer, but there have been NO issues with the config, although modifications are a bit more difficult. Which leads us to the next piece of software,

ARD - Apple Remote Desktop
ARD allows you to open a remote Mac window on your computer. You can operate it just the same as if it was in front of you and do everything you can do to a computer you can touch, but do it from half way around the world. (trust us, we've done it from 7,000 miles away, so an extra couple of miles won't make a difference) Don't want to pay for ARD? how about,

If you give your server an iChat account, and configure your own address for automatic login and screen sharing, you can have a free version of ARD that will work well enough to do most of the work you'll require, just not quite as fast as the real ARD. It's a cheap and easy way to control a remote machine and if you're careful in your setup, it will do the job for you.

Download Pure FTPD. Sets up the accounts, does the permissions, keeps track of when they log in. Free.

GoDaddy. Free primary & secondary. You don't have to use them as your registrar and they still give you free DNS. No hassel DNS is a wonderful thing. Forgetting about DNS issues is even better. And they have yet to spam me, so it's even better.

We use MGI3 on many of our sites. It provides much of the functions of PHP in a much clearer language. Take a look at the PagePlanet site for more details.

Backup Strategy

Cloud backup
Lots of options, some free, but watch for some issues when you are mixing TimeMachine, Cloud based backups and SuperDuper. You can have problems with too much of a good thing.

Your server is almost ready to run. You've got the connection, your DNS numbers are ready to be put into the system, and you're wondering "What else?"
Backing it all up so it works. You've installed Carbonite for offsite backup and your Time Machine drive is ready, but there is still one more problem. If you need to recover from a total crash, Time Machine will restore the files but not the server settings. That's a big problem. Yes you have the data, but without the settings, you have no idea who the users are and how they log in or where they can go after they get in. Those settings are NOT backed up by Time Machine and are pretty hard to find on any backup.
*Further to Apple's Time Machine!
It would seem that Apple does not support Time Machine and CHAX on servers. Removing CHAX and using ARD for remote work has fixed the problem.

What we need to do is create a full bootable backup every day on an external drive. Don't you already have an external drive? Sure, and you can use it for this, it only takes a few minutes to set it up.

  1. Open the application Apple Disk Utility, it's normally in the Utilities folder inside the Applications folder.
  2. Select the disk from the list on the left side column. It will normally be the second one, and be called by the manufacturer's name and model number. There will be 2 entries for each disk, the topmost one is the one you want.
  3. Select the Partition tab on the right (main) side of the screen. If it's not there, you have selected the wrong drive name.
  4. If you already have data on the drive, say you've already started to back up, just click on the + sign below the partition map. This will keep the data that is on the drive.
    If the drive is still a virgin, you can select the number of partitions you want from the pulldown menu in the top center of the page. This way the drive will be wiped then the new partitions will be written.
  5. Click on the lower drive partition in the map and change the size of the partition to the same size as your internal drive. This way you'll have enough room for the full backup NEW: Make 2 System restore partions!
  6. Click OK and wait for a moment. Get a coffee. Read some mail.
  7. When it's done, close Disk Utility and rename the new drive partitions. The larger one will be your Time Machine destination, the smaller one your bootable drive. We'll call the bootable part "System Restore" and the larger part "Time Machine Drive" (Creative writing is taught on the other server)
The hardware setup is complete, now we do the software.
  1. Your computer has probably detected the drives and wants to use one for Time Machine. Help it select the "Time Machine Drive" by clicking and holding on the Time Machine icon in the dock and selecting "Time Machine Preferences". Select the drive.
  2. Download SuperDuper and pay for it. Register it before you go any further.
  3. Click on the lock and enter your password so it doesn't need it again.
  4. In the "Copy" menu, select your main drive
  5. in the "to" menu, select your System Restore" drive
  6. In the "using" menu, select "Backup all files"
  7. Click on "Options" and click in "repair permissions on . . ."
  8. Leave "Erase (drive name) then copy files . . .
  9. In "On successful" you can choose to do nothing.
  10. Click "Advanced" and make sure that "Copy ACLs from . . " is selected
  11. Click OK
  12. Click "Schedule"
  13. Select "On the following schedule"
  14. On the first extra partion, set it up to duplicate for Monday, Wednesday & Friday. On the second partion, Tuesday, Thursday and Saturday and/or Sunday.
  15. Set the time for the backup to happen. A slow time like 3:00 am is good for a web server, an office server would be best backed up just after close of business each day.
  16. Click OK
  17. Close the Scheduled Copies window
  18. You're safe now
So what happens if you have a catastrophe? First, you can use the Startup Disk Preference panel to choose the backup copy right away. Then, using the backup as the startup, you can use SuperDuper to wipe the internal disk. You'll want to check the disk to make sure it's still good and does not have any hardware issues right away and then restore it from the backup. Then, using Time Machine, copy all the current or best files to the the documents, webserver or groups folders. Once you've done that, you're back to the point you feel safe at. You should be OK at this point. You now have 2 restore copies to work from, since one may have a corrupted copy. A little safer at no extra cost.

More Help
e-mail me. Rates are reasonable.


Locations of visitors to this page
Find more about Weather in Toronto / Downsview, CA
Click for weather forecast

Interactivepages -  416 822 5671

The official webcam of the A pleasant scene from the legendary interactivepages estate, in Toronto, Canada. This scene is supplied by an LOREX wireless InfraRed Color camera looking out of our back window. The large black dog you can sometimes see is our Boxer, the newly world famous Herschel, Wonder Dog of the Internet II. The bird feeder is visited each day by at least 5 pairs of Cardinals along with Blue Jays, Junkos, Chickadees and numerous Finches, Sparrows and Morning Doves. The backyard also has a pond in the back corner, to the left of the picnic table, where our koi live. Why not consider a webcam for your site? Ever thought of a webcam on your site? We can do it for a suprisingly low price.