10.4: Build Apache 2.2.3, php 5.1.15 and mysql 5.0.24

Aug 29, '06 07:30:01AM

Contributed by: Tetonne

This hint will only work if you have Xcode installed -- get it for free at Apple's Developer website.

The following steps use Terminal, and you'll probably have to use sudo on some of the commands if you're not logged in as root.

Download:

$ wget http://mirrors.ircam.fr/pub/mysql/Downloads/\
MySQL-5.0/mysql-standard-5.0.24-osx10.4-powerpc.dmg
$ wget http://www.apache.org/dist/httpd/httpd-2.2.3.tar.gz
$ wget http://www.php.net/distributions/php-5.1.5.tar.gz
Decompress
$ gnutar -xzf httpd-2.2.3.tar.gz 
$ gnutar -xzf php-5.1.5.tar.gz
Backup mysql data and install mysql
  1. cp -Rp /usr/local/mysql/data /Users/your_user_name/ -- only necessary if you're updating.
  2. Install mysql-max-5.0.24-osx10.4-powerpc.dmg -- install everything.
  3. rm -rf /usr/local/mysql/data -- only necessary if you're updating.
  4. mv data /usr/local/mysql/data -- only necessary if you're updating.
Read the rest for the Apache and php instructions...

Compile Apache

$ cd httpd-2.2.3 
$ ./configure --prefix=/Library/Apache2 --enable-access \
--enable-actions --enable-alias --enable-asis --enable-auth \
--enable-auth_dbm --enable-auth_digest --enable-autoindex \
--enable-cache --enable-cgi --enable-dav --enable-dav_fs \
--enable-deflate --enable-dir --enable-disk_cache \
--enable-dumpio --enable-env --enable-expires --enable-fastcgi \
--enable-file_cache --enable-headers --enable-imap \
--enable-include --enable-info --enable-log_config \
--enable-log_forensic --enable-logio --enable-mem_cache --enable-mime \
--enable-mime_magic --enable-negotiation --enable-perl \
--enable-rewrite --enable-setenvif --enable-speling --enable-ssl \
--enable-status --enable-suexec --enable-unique_id --enable-userdir \
--enable-usertrack --enable-version --enable-vhost_alias --enable-so \
--enable-module=all --enable-shared=max 
$ make 
$sudo make install
Compile php
$ cd php-5.1.5 
$ mkdir /usr/local/php 
$ ./configure --prefix=/usr/local/php --with-zlib --with-xml --with-xsl \
--with-mysql=/usr/local/mysql --with-apxs2=/Library/Apache2/bin/apxs 
$ make 
$ sudo make install 
$ cp php.ini-dist /usr/local/php/lib/php.ini
Add in httpd.conf (found in Library/Apache2/conf): Launch Apache with sudo /Library/Apache2/bin/apachectl start. Thanks to bofh for the help with this one...

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2006082512161389