I was excited when Apple anounced the new Mac mini Server, and was allowed to buy one for the company to install DC-X on it.
It’s a beautiful computer, and very small, of course! The mini makes no noise at all and doesn’t require a keyboard, mouse or display after the initial installation. The perfect server to carry around, place on your desktop or next to your router at home. „DC-X to go“… Its 1 TB of disk space should be good for a couple hundred thousand images, making it a great test/evaluation setup (or even a small production system?).
Installing DC-X is easy, but you have to make sure that the prerequisites are met: Apache 2, MySQL 5.1, PHP 5.3, Memcache, ImageMagick, Supervisor, an LDAP server etc. Quite a lot of stuff is being shipped with Mac OS X Snow Leopard Server (make sure to install XCode from the installation DVD), and MacPorts supplied almost everything else („sudo port install pcre ghostscript rrdtool memcached libmcrypt libpng jpeg freetype ImageMagick wget“). The MySQL version was too old for DC-X, so I installed the latest MySQL 5.1 OS X package – make sure to use the 64bit version! (and set „mysqli.default_socket = /tmp/mysql.sock“ in /private/etc/php.ini, the default value doesn’t work).
I was able to use the preinstalled Apache and PHP. (By the way: I was surprised that Apple doesn’t configure Apache to advertise itself via Bonjour, and I wasn’t able to make this work.) Some PHP modules were missing, I compiled these extensions separately (phpize; CPPFLAGS=“-I/opt/local/include“ ./configure, make, sudo make install) and added them in php.ini: pcntl, zip, mcrypt (for these three, download the PHP 5.3.0 sources and go into the appropriate „ext“ subdirectory), APC, memcache (requires a patch).
Supervisor and ExifTool (MacPorts only had an outdated version of the latter) were easy, I used their standard installation routines.
My initial plan was to use the LDAP server provided by OS X Server, allowing us to use their graphical user management interfaces and to integrate DC-X user accounts with the system-wide accounts. This seemed to work fine first, but when I took the Mac mini home, it seemed to be confused suddenly belonging to a different network and I wasn’t able to connect to or manage their LDAP in that environment. So I had to resort to a parallel OpenLDAP installation, but I hope someone will help me figure out how to safely move the server between networks…
The actual DC-X installation went smooth, I included its Apache configuration in /etc/apache2/sites/0000_any_80_.conf and after a „sudo /usr/sbin/apachectl restart“ I was able to use the DC-X web interface. (I haven’t yet set up DC-X to automatically start at boot time, I guess this involves a custom plist file in /Library/LaunchDaemons and invoking launchctl on it.) Great to see DC-X run on Snow Leopard Server for the first time!
Installing DC-X was just the first step. If time permits, I’d love to find out how to integrate with the server functionality provided by OS X Server: The file server, Wiki server, calendar server, mail and instant messaging…