I had the opportunity to configure a new Snow Leopard Server for a customer who is running a Ruby application. Despite Apple’s claim that Snow Leopard Server is ready “out of the box” it turns out it isn’t quite “all” ready. Below are the extra things I had to do. Special thanks to Ryan Wilcox (Wilcox Development) who found the pertinent Apple KnowledgeBase page.
- Visit http://support.apple.com/kb/TA25017 (MySQL header files available for download)
- Follow the link to the current header files
- Download the MySQL binary. Here the instructions on Apple’s page (for Leopard) fall apart. Since Snow Leopard automatically un-zips the download, all you have to do now is:
- sudo tar -zxvf <downloaded_file> -C /
That did it.
Not quite. Later on I got word that a ‘migrate.db’ failed. Searching about found this page from TechLiberty and this page from rubyonrails.org — both provide useful information buried in stuff I didn’t need, as they are dealing with the ‘regular’ version of Snow Leopard.
Bottom line: MySQL has to be installed as a 64-bit application. On Snow Leopard Server, the magic incantation is:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
(Note the path to mysql_config is different than those pages; this is the ‘server’ difference.)
Another very nice thing Ryan showed me was the Unix “Locate” command. But first you have to build the locate database by issuing this command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
And the ‘locate’ database is rebuilt nightly, so don’t expect real-time updates.
May 27, 2010 12:52 PM