LAMP on Leopard

To build LAMP first off you need to enable root user, see the official help here. To save you a few clicks, here they are

  1. From the Finder’s Go menu, choose Utilities.
  2. Open Directory Utility.
  3. Click the lock in the Directory Utility window.
  4. Enter an administrator account name and password, then click OK.
  5. Choose Enable Root User from the Edit menu
  6. Enter the root password you wish to use in both the Password and Verify fields, then click OK.

To enable PHP that comes with Leopard, see good reference here. I got version 5.2.6 from that came with Leopard.

Then you need to enable it in Apache.    Find this file

/etc/apache2/httpd.conf

locate the line

#LoadModule php5_module libexec/apache2/libphp5.so

and uncomment it.

I can either start ‘web sharing’ at sharing panel in system preferences or you could start it at terminal

sudo apachectl start

The webroot is at

/Library/WebServer/Documents/

now make a test file echo phpinfo() to test if php is in fact running, where the full path of php.ini is and which version of PHP that is and if modules you want are enabled.

Next would be MySql server, I picked mysql x86 for 10.5 installer format from here.   There is a good reference here

I know installing phpmyadmin wouldn’t be easy so I decided to use command line first, find this folder

cd /usr/local/mysql

enter mysql cli by

sudo ./bin/mysql -u root -p

during installer installation I wasn’t asked for any password set so it will be nothing.   Then I followed my own howto to create database and download svn copy of WP.

There is some tricks when installing WP solution is here, that is the 1% chance that you don’t enter localhost as database host server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: