Author Topic: Compiling Apache 2.2.6 and PHP 5.2.4 on OS X  (Read 451 times)

Offline scotbuff

  • Sys Admin
  • UNIX User
  • *****
  • Posts: 174
  • Karma: +2/-0
    • View Profile
    • Scott.Buffington.me
Compiling Apache 2.2.6 and PHP 5.2.4 on OS X
« on: November 17, 2007, 11:12:41 pm »
This is more for my reference, but it might be useful to others.
Download Apache then:
Code: [Select]
cd /httpd-2.2.6
sudo ./configure --prefix=/apache2 --with-ldap --enable-mods-shared="all ssl ldap cache proxy authn_alias mem_cache file_cache authnz_ldap charset_lite dav_lock disk_cache"
sudo make
sudo make install

Download PHP then:
Code: [Select]
cd ../php-5.2.4
sudo mkdir /apache/php
./configure --prefix=/apache2/php --with-zlib --with-xml --with-gd --with-freetype-dir=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-mysql=/usr/local/mysql --with-apxs2=/apache2/bin/apxs
sudo make
sudo make install
sudo cp php.ini-dist /apache/php/lib/php.ini

Notice that I had installed prerequisites, such as freetype, which can be downloaded and compiled.  Fink is also a useful tool for the prereqs.