Snow Leopard Development Server: MacPorts
With the release of Snow Leopard, I had started to make a laundry list of the features I wanted my development server to have. In previous incarnations, I had built everything from source code. In some respects, I approached it this way as a learning experience. Now, however, I want as little down time on the server as possible.
Preliminary Work
I am working on my brand new 27" iMac (2.8GHz i7, 4 GB RAM). After running System Update, I installed Apple's Developer Tools (this is required for MacPorts).
Install MacPorts
I decided to use MacPorts to manage the server's open source packages. MacPorts has convenient binary installers. As of this writing, the latest version for Mac OS X 10.6 is 1.8.2.
MacPorts installs everything in /opt/local. Since this path is unique to MacPorts, it is not part of the standard Leopard path search for Unix executables. In other words, any time I want to use the "port" command, I must write /opt/local/port
.
I can avoid this slight inconvenience by modifying the PATH variable. Unlike previous incarnations of Mac OS X, Leopard (10.5) and Snow Leopard (10.6) eschew a static PATH environment variable in /etc/profile. Instead, Mac OS X 10.6 maintains the executable paths in /etc/paths, which I want to modify to include /opt/local/bin
and /opt/local/sbin
.
Listing: /etc/paths
/opt/local/bin /opt/local/sbin /usr/bin /bin /usr/sbin /sbin /usr/local/bin
Updating MacPorts
After installing MacPorts (or before doing any port installation), it is considered a good idea to let MacPorts update itself.
sudo port -d selfupdate