Here’s a quick checklist of the steps I just took to get all my web dev stuff set up on my new MacBook with Leopard. I do mostly Ruby on Rails work with some PHP stuff thrown in there, so we’ll go through installing MySQL, PHP, Rails, Git and Passenger.
1) Install Developer tools – these are on the main OS installation disc, and you won’t be able to gem update –system until you have them installed.
2) Install MySQL – for this I followed these instructions from Dan Benjamin. The only difference is that now MySQL 5.1 is out, so this block:
curl -O http://mysql.he.net/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz
tar xzvf mysql-5.0.67-osx10.5-x86.tar.gz
cd mysql-5.0.67
becomes this:
curl -O http://mysql.he.net/Downloads/MySQL-5.1/mysql-5.1.30.tar.gz
tar xzvf mysql-5.1.30-osx10.5-x86.tar.gz
cd mysql-5.1.30
3) Enable PHP – open the apache config file (httpd.conf) and un-comment the line to load the PHP module
# /etc/apache2/httpd.conf
line 115
LoadModule php5_module libexec/apache2/libphp5.so
4) restart apache with sudo apachectl restart
5) update Gems and install Rails
sudo gem update --system
6) Install Git (taken from http://subtlegradient.com/articles/2008/02/21/install_git_leopard)
# create a directory to download to
mkdir -p /usr/local/src
cd /usr/local/src
Set options since we don't have GNU gettext installed
export TCL_PATH=which tclsh
export NO_MSGFMT=1
export GIT_VERSION='1.6.0.6'
Get and install git
curl -O "http://kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.bz2"
tar xjvf "git-$GIT_VERSION.tar.bz2"
cd "git-$GIT_VERSION/"
./configure
make
sudo make install
Colors? YES!
git config --global color.ui auto
Personal Setup
git config --global user.name "Your Name"
git config --global user.email your_email@your-domain.com
7) Install Passenger
$ sudo gem install passenger
$ sudo passenger-install-apache2-module
Then follow these instructions to finish configuring Apache for Passenger.
That’s it! If anything went wrong, the answers are readily available all over the web. I made this list more as a checklist for myself than to provide any new info that isn’t already out there. Now go make a Jack and Coke and chill for the rest of the day.