Donate to Wikipedia

Transform a Mac into an Open-Source Server

The Tutorial


You can now use MacPorts to install the latest packages of Apache, MySQL and PHP. You can follow the MacPorts Installation tutorial, if MacPorts is not yet installed.

A powerful feature of MacPorts is that you can install packages together, and the various dependencies will be figured out for you. So to install Apache version 2, MySQL version 5 and PHP version 5, enter the following at the command line (as it is a sudo command, you may be asked to enter your adminstrative passwrod):

sudo port install php5 +apache2 +mysql5

This will take a while to download and run through everything. As an example, it takes approximately 1.75 hours on a 1.66 GHz Intel Core Duo Mac Mini.

Please refer to the sub-menu pages on the left for Apache, MySQL and PHP, for information on how to configure these applications in the MacPorts opt directory.

A log of the Apache/MySQL/PHP (DAMP) installation can be found here.