Skip to content
Advertisement

How should I got about setting up a local LAMP stack with switchable PHP and MySQL on OS X?

I’m moving house in a few weeks and am taking the opportunity to update my tech setup, switching from a MacBook Pro and a MacBook Air to a MacBook Air (which will be my day-to-day computer) and a Mac Mini Server (which will be a media hub and be used for heavy lifting).

As part of this process, I’d like to get a good local LAMP stack set up for web development work. This LAMP stack would include switchable PHP and MySQL versions. I’d like one development environment for the MacBook Air, and another for the Mac Mini Server.

Up to now I’ve used XAMPP on OS X for all of my development, but switching PHP and MySQL versions on XAMPP is far from straightforward, and seems to miss the point of having an out-of-the-box solution.

I’m thinking that maybe the best way to proceed is to set up a virtual Linux server on the MacBook Air, and another (accessible to anyone on my network with sufficient access privileges) on the Mac Mini Server, and find some way of mirroring these. This would have the advantage of forcing me to learn some basic Linux server administration skills.

I’ve tried setting up a virtual Linux server on my MacBook Pro before, but always get stuck when it comes to accessing that server from the host OS X installation: so, please don’t answer with “just set up Ubuntu with bridged networking”!

Advertisement

Answer

I cross-posted this question to my Facebook wall, and was eventually guided towards using the Macs as web servers rather than using XAMPP or MAMP or a virtual machine. Homebrew – Link – can then be used to switch out MySQL and PHP (and, if you want, Apache) installs.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement