This is quick document explaining the trials and travails of setting up a Powerbook G4 as a development box with Apache, PHP, MySQL, Ruby on Rails, Java, and Tomcat. After turning on the Powerbook and connecting to my wireless network, the computer automatically downloaded and installed all of the latest and greatest updates from Apple. I proceeded to install Firefox, Adium, Microsoft Office and some other standard productivity applications before turning to my real task — getting my development environment up and running.
I’ve been developing under Windows for years, so getting Java, Eclipse, Tomcat, Apache, PHP, and MySQL installed and running is second nature to me in that environment. I’ve also done the same on plenty of Linux boxes. The Mac is sort of a hybrid of both, and I’m still learning my way around.
I know that the Mac comes with Apache and PHP installed already, but I have no idea where they are or how they work, so I took the advice of some more clueful people and decided to install my own copies. I learned that the best approach here is to used Fink, which is a sort of package manager that makes it “easy” to build or install popular open source software under OS X. Installing Fink and Fink Commander was easy enough. I have always hated the Debian package manager (yes, I know everyone else loves it), but I managed to get MySQL installed without a hitch. I then moved on to Apache, which also installed easily enough.
Things got a bit hairy when I tried to install PHP5, which has about 75 dependencies, and kept whining when I tried to install it. After a few aborted attempts I gave up and tried to install the Subversion client. That failed too, so I installed the binary version of one of the libraries that Fink was complaining about, and after doing so was able to get the SVN client to build (all of the compiling probably took four or five hours).
In the meantime, I installed Eclipse, which was dirt simple. Download and extract the archive, then click on the icon. Everything seemed to work right out of the blocks. I’m a bit disappointed that Eclipse isn’t packaged in an OS X installer, and is currently living in my home directory. The OS X port of Vim was more cooperative. (Although, while I’m a diehard vim-head, I may have to go back to BBEdit or something because the ugly little Vim window looks out of place on a Mac. That never bothered me under Windows.)
When I went back to installing PHP, I found that there was some kind of weird dependency problem. I have autoconf 2.5x installed, and it’s complaining because it can’t remove that install version 2.1x instead. A few attempts to figure out what to do next failed, so I shelved that project temporarily.
I did manage to find the Ruby install on this machine, and run this fix because that seemed like the right thing to do. I then followed some of these instructions to get Rails installed. (I haven’t bothered with FastCGI yet, because WEBrick is fine for my use.)
The following morning: I’m still working on getting PHP installed. My current thought is that some instability was introduced when I switched Fink to use unstable packages and I didn’t update everything. I’m doing that now, and the compile is taking many hours. Judging from the progress bar, many hours still remain. When that’s complete, I’m going to give PHP another shot.