Ditch MAMP on Snow Leopard

I was fond of the stack XAMPP offered when I developed on Windows and lazily continued used XAMPP/MAMP once I moved to a Mac OS X based workstation. Unfortunately, the latest releases of MAMP have attempted to restrict the utility of the stack in an effort to raise revenue through a less restricted "Pro" version. Developers on Snow Leopard are much better off moving to standalone installations of everything MAMP offers.There are many ways to install PHP, MySQL, Apache, and phpMyAdmin - all with a list of pros/cons. Without debating the merits, here's what I did to replace MAMP:

1. Dump your MAMP Mysql databases and save them for import into your standalone MySQL install

mysqldump --all-databases > ~/old-mysql-data.sql

2. Install a more recent copy of MySQL server than the one delivered with Snow Leopard

I already had macports installed, so the choice here was easy. The following command installs the mysql binaries under /opt/local/bin/port install mysql5 mysql5-server

3. Import your data into your new MySQL database

First, be certain to shutdown all the MAMP servers (MySQL, Apache, etc...) - then start your new standalone MySQLsudo /opt/local/bin/mysqld_safe5 &Finally, run the following:mysql

4. Install phpMyAdmin on the SL delivered Apache installation

Install it fresh, or just copy your MAMP installation to ~/Sites where it will be available under http://localhost/~your-username/

5. Enable PHP5 on the SL delivered Apache installation

Open /etc/apache2/httpd.conf and enable the line: "#LoadModule php5_module libexec/apache2/libphp5.so" by removing the pound. Then in the Mac System Pref -> Sharing, turn on (or if it was already on, turn off/on) Web Sharing. If you need to move any vhost or SSL config directives from MAMP to the SL Apache install, you'll make those changes to files in /etc/apache2/extra/

6. Optional - Configure PHP by creating a php.ini under /etc

I'm content to use the PHP installation already delivered by SL, but there is no default php.ini - simply create one under /etc and it'll be read automatically.You can now remove the MAMP training wheels and proceed developing with full standalone versions of your stack - happy trails.