I have taken part of my day to get my main web server upgraded to MacOS X 10.5 (aka Leopard). I spent quite a bit of time waiting, removing programs I knew were incompatible, and so on. Still, this upgrade was not without a few bumps:
- Check Hardware Compatibility: My Sonnet Tempo SATA X4P card (which I use to provide an external SATA [eSATA] interface for my RAID of data drives) was incompatible with Leopard and would cause the installer to hang. I finally discovered a firmware upgrade was available that fixed this. This was a stupid rookie mistake. Rule of Thumb: Always check the non-Apple hardware for updates before making a major OS X upgrade.
- Watch out for /home: I had been using a symbolic link from
/Usersbecause in my old Unix days, I hardcoded a lot of my software to look for my home directory in
/home. Leopard expects
/hometo be available as mount point for the automount service, so getting with the modern era and not relying on
/hometo point to
/Useris required if you adopt Leopard.
- Rebuild Web Server Configuration: One problem I was prepared for is that the web server was updated to Apache2. This in itself was not bad, but the configuration files for Apache (version 1) were stored in /etc/httpd and the new configuration files for Apache2 are in /etc/apache2 and they were NOT migrated. I don’t fault Apple for not migrating the files, but I kicked this around on my laptop quite a bit in order to tweak the configuration files back to something I liked. One thing I immediately did was that this MacOS comes with PHP 5.2.4 preinstalled, but not enabled in Apache2. I enabled it by editting the
/etc/apache2/httpd.conffile (which you might have to create) and uncommenting the line with
# LoadModule php5_module(by removing the ‘#’ symbol from the beginning of the line). Once that was done, I restarted the Apache2 server and all my PHP code (including this blog) was running again.
Tweak MySQL for Leopard: The PHP 5.2.4 included with MacOS X is compiled with support for MySQL. This is nice in that you can just download the MySQL package installer and quickly get a LAMP server running. However, it was set up with the MacOS X Server version of MySQL in mind, which means it expects the socket to be in a different location than the vanilla MySQL. This can be solved by either tweaking the MySQL configuration (as outlined in the MySQL section of the blog post at http://remysharp.com/2007/10/27/lamp-in-leopard-osx-105-php5-and-apache-22/ ) or by tweaking the PHP configuration by editing the
/etc/php.inifile (if it doesn’t exist, first copy
/etc/php.ini) and search for the line containing
mysqli.default_socket =to read
mysqli.default_socket = /private/tmp/mysql.sockThis solution seemed more straight forward, so I did this.
- Reinstall MacPorts: Since I am aficionado of MacPorts, I reinstalled it and rebuilt all the ports. Some of the issues I had before with MacPorts on Leopard on my MacBook Pro cropped up again on my PowerMac G5, notably
- gv still needs to be patched as I noted here.
- sqlite3 still does know about its dependence on nawk.
- xterm doesn’t install unless you update your X11 installation using the latest version of Xquartz (currently at version 2.1.4).
- Update to latest version of Xquartz: Since I don’t like X11 headaches, I updated to the latest version of Xquartz (currently at version 2.1.4).
So the adventure continues. Back to research, I have invested about 5 hours of my spring break into this upgrade, that is enough for now.