Download TARs of:
php
apache httpd
newest MySQL
APC
apache:
# untar, cd into dir
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load" ./configure --prefix=/usr/local/apache2 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc/httpd --enable-static-support --enable-ssl --with-ssl=/usr/bin --enable-so --with-mpm=prefork --enable-modules="ssl access expires deflate headers setenvif mime dir alias rewrite deflate" --enable-mods-shared="auth auth_anon auth_digest actions asis auth autoindex cgi cgid charset_lite env imagemap include log_config negotiation status userdir cache mem_cache file_cache disk_cache proxy proxy_http proxy_ftp proxy_connect proxy_balancer dav dav_fs dav_lock ext_filter info speling unique_id usertrack vhost_alias" --with-included-apr
make
sudo make install
mysql:
# untar, cd into dir
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --with-zlib-dir=/usr --with-charset=utf8 --with-collation=utf8_general_ci --bindir=/usr/bin --sbindir=/usr/sbin --enable-assembler --with-mysqld-ldflags=-all-static --prefix=/usr/local/mysql --enable-shared --enable-static --enable-thread-safe-client
make
sudo make install
sudo mysql_install_db --user=mysql
#(open up new terminal)
sudo mysqld_safe
#(back in the old terminal)
sudo mysql_secure_installation
#(go through the config procedures)
#(close the other terminal)
php:
# get these dependencies:
# jpeg-6b
# libmcrypt
# mcrypt
# mhash
cd ./libmcrypt-2.5.8
./configure --bindir=/usr/bin --sbindir=/usr/sbin
make
sudo make install
cd ./mhash-0.9.9
./configure --bindir=/usr/bin --sbindir=/usr/sbin
make
sudo make install
cd ./jpeg-6b
sudo cp /usr/share/libtool/config.sub .
sudo cp /usr/share/libtool/config.guess .
./configure --enable-shared --bindir=/usr/bin --sbindir=/usr/sbin
make
sudo mkdir -p /usr/local/man/man1
sudo make install
# if missing libpng, get it from here:
# http://sourceforge.net/project/downloading.php?groupname=libpng&filename=libpng-1.2.8.tar.bz2
# untar it and cd into the dir
cp scripts/makefile.darwin makefile
make
sudo make install
make clean
# go get a recent copy of php, untar it and cd into dir
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load" ./configure --prefix=/usr/local/php --bindir=/usr/bin --sbindir=/usr/sbin --with-config-file-path=/etc --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local/mysql --with-curl=/usr/bin --with-curlwrappers --with-openssl-dir=/usr/bin --enable-mbstring --with-pdo-mysql --with-xsl=/usr/bin --with-xmlrpc --with-bz2=/usr --with-zlib-dir=/usr --enable-xml --enable-mbregex --without-pear --with-mcrypt --with-mhash --enable-static --with-gd --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
make
sudo make install
# after you run the mega configure thing look for any config errors. There
# might be some because of missing GD things (eg: libpng, freetype, etc).
# to install php, those will be needed.
# go get a copy of php apc
# untar it and cd into the dir
phpize
./configure
make clean
make
sudo make install
apache:
# if it won't start with apachectl start, go comment out all modules
# but php
# make sure the ServerRoot is correct, eg: /usr/local/apache2/
# make sure apache is listening on port 80: Listen 80
# remove these includes if they exist:
# Include /private/etc/httpd/users/*.conf
# Include /System/Library/WebObjects/Adaptors/Apache/apache.conf