Setting up a development environment on OSX

Setting up a development environment on OSX, with PHP, MySQL, Apache, Subversion and Eclipse.

Turn on Apache

Mac OSX comes with Apache, so all you need to do is turn it on:

If you go to http://localhost, you should see the Apache start page.

Installing PHP

Download PHP5 package from entropy: http://www.entropy.ch/software/macosx/php/

You can't use stuffit, so unpack using command line:

shell> gunzip entropy-php-5.2.4-1.tar.gz
shell> tar xf entropy-php-5.2.4-1.tar
Then run the installer.

Installing MYSQL5

Download package from: http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg

Run the two installer packages.

To add a MySQL path so you don't need to keep typing "usr/local/mysql/bin/" each time, edit the file: /etc/profile:

sudo pico /etc/profile
and update the path by adding: usr/local/mysql/bin/ for example:
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin"

Installing SVN

Download SVN installer package from: http://metissian.com/projects/macosx/subversion/

We need to edit the /etc/profile file again to allow the SVN command.

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/usr/local/bin"

Eclipse

Download Eclipse from: http://www.eclipse.org/

Install eclipse plugins, using