views:

276

answers:

3

I've found myself down a rabbit hole and would like advice. It looks like Mac OS X 10.5.8 comes bundled with a pre-configured version of Apache 2.2.11 (located in /usr/sbin), PHP 5.2.10 (located in /usr/bin) and subversion 1.4.4 (located in /usr/bin). I have installed MAMP for MySQL 5.0.41 (located in /Applications/MAMP/...) which comes with Apache 2.0.59 and PHP 5.2.6. The current version of MySQL is 5.1 (mysql.com). I have also installed the latest Subversion binaries 1.6.5 (they get located in /opt/subversion/...). This is becoming a mess. Ideally I would like to have one copy each of Apache, PHP, MySQL, and Subversion and have them all be the latest release and have them work together properly. Are there configuration pitfalls specific to the Mac that I need to watch for if I install the newest binaries of Apache in /usr/sbin, PHP5 in /usr/bin, subversion in /usr/bin, and Mysql in /usr/bin (or /usr/local/bin)? Am I just asking for trouble?

+2  A: 

Do not install ANYTHING in /usr/bin or /usr/sbin. Those are managed by Apple and you can get yourself and your system in trouble when you start modifying stuff there. Other than a bit of wasted disk space, there's normally no problem with having more than one copy of things like Apache. Just accept it.

If you need newer or missing versions of open source packages, you might want to look into using MacPorts or Fink to supplement what's provided by Apple.

Ned Deily
I use Fink and have used MacPorts in the past. Both have outdated binaries. I am leaning towards just compiling everything. Thanks for the input.
Bob Setterbo
Um, MacPorts doesn't supply binaries: you *have* to compile everything. The thing is, it does it for you in a controlled environment with some degree of assurance that the various pieces play together. Fink, OTOH, does supply some binaries but they've pretty much moved away from keeping them up-to-date and, instead, also have a source upgrade path similar to MacPorts.
Ned Deily
BTW, a quick check of the MacPorts pages vs the individual project pages shows that, for the moment at least, it looks like the MacPort's versions of those packages are all current: Apache 2.2.14, php 5.3.0, MySql 5.1.40, Subversion 1.6.5
Ned Deily
My bad - I misspoke when I said binaries. Distributions would be the correct term. I'll look into MacPorts. Thanks again.
Bob Setterbo
A: 

My personal preference is just not to do this development on my Mac at all, and instead run a Linux Virtual Machine using VMWare Fusion, VirtualBox or similar. One of thes nice things about VMWare Fusion 2 (not 3 though, bizarrely) is that you can run these virtual machines in headless mode, and simply SSH into them via terminal on your Mac.

The benefit to me here is that my VMs are able to very closely mirror the setup of my production machines, I'm able to closely control what software is actually installed on them, and if I need to work on a new machine I can simply copy the VM from one machine to another. I can also easily take snapshots of the VM at any point, and roll back to them if I do manage to muck something up.

Here's a good guide to using VMWare Fusion for doing development on OSX.

NeilCrosby
I have been thinking about using virtual machines for development - I guess versionitis is another good reason to consider that path. Thanks for the input.
Bob Setterbo
A: 

I have been developing for the LAMP stack on a Mac for bit over 4 years now. I have tried pretty much every flavor of the stack on the Mac.

  • Native: Not viable, because it's an old codebase.
  • MacPorts: I ran into trouble with OS X updates.
  • Self Compiled: Same as with the MacPorts, I ran into trouble with OS X updates.
  • MAMPP: I didn't like this package, yet this is a personal dislike. I kind of disliked it's freemium like style. The package is not easily configurable, except using the commercial configuration software.
  • XAMPP: I ended up sticking with XAMPP.

About XAMPP:

The XAMPP code base is rather up to date. With the Developer Package, you get all the tools necessary to compile additional extensions. Everything is configured in /Applications/XAMPP/etc/.

Pierre Spring