MacTroll has been very good about posting helpful tutorials for the installation of various unix-type tools and plugins for OSX Server. However, many of you might find (as I have) that attempted unix installs sometimes just don’t work (usually with a returned error like "no c-compiler found" or the like). This is because Apple has kindly left out a bunch of unix stuff from the base install, including the all-important gcc compiler for installing/compiling unix software. For those of us lucky enough to have physical access to the problematic server, it’s easy to pop in the Developer Tools CD and install Developer Tools.mpkg by double-clicking. However, I recently found myself needing to install some unix stuff, and had neither Developer Tools nor physical access to the server. So here’s what I did.First, I opened an afp connection to my admin home folder on the server (I did so directly to the box, but going through a VPN would be preferable). I could have ftp’ed the files I needed up, but afp give me an option to send an encrypted password and to tunnel the connection though encrypted ssh (under the "Options…" button after I hit command-k on the keyboard and type afp://myserver.mydomain.mysuffix).
Then, I got the developer tools files, which I didn’t have on my person at the time. I have a membership at developer.apple.com – from there I downloaded the Developer Tools (now known at the developer site as "X Code Tools") via ftp – I used Safari, so I got a mount of the ftp directory on my desktop. The X Code Tools disk image is split up into .bin sections – if you try this, open the one that is not numbered, and the rest will be linked to it automatically by Stuffit Expander. You’ll see the familiar Disk Image Mounter verification notice – don’t skip it – remember that you are building a "virtual" disk image out of about 25 different chunks!
Once the disk image was mounted, I used the duplicate (command-d) command to copy the mounted image to a folder. Then I simply dragged the new folder to the afp share I had mounted. (Note: It would clearly be easier in low-bandwidth situations to download the developer tools via command-line from an ssh session made to the server in question – however, it seems that Apple has only made a download available via a secure web page – so no easy anonymous ftp. If there IS a way to ftp the files from Apple’s servers, let me know!) Fortunately, I had a fast connection.
If I’d had the Developer Tools/Xcode cd with me, I would have packed it up with Disk Utility (compressed) and sent it off – uncompressing it with hdiutil once it got over.
After the transfer was done, a little digging in the man page for "installer" yielded this command string:
[server:~] admin% sudo installer -verbose -pkg DeveloperTools.mpkg -target /
(the "/" is the boot drive of the server – most packages must install to the boot drive – also, happily, the developer tools package does not need a reboot after installation)
The "-verbose" option gives you some nice visual feedback to see how things are going – it’s a very long install, and it’s nice to see a progress indicator.
Also note that you need to do something like "cd Xcode\ Tools" to get into the Xcode Tools directory so that you don’t get a path error. Or you can be a sexxy admin and specify the full path.
Now you are able to install a much wider array of unix programs/plugins/utilities. In my case, I was trying out the Sieve install process that MacTroll had outlined – that install I’m still debugging, but otherwise, everything went very well.
"Fixing my mistakes, one server at a time"