Friday, May 7, 2010

How to build php 5.3.2 and apache 2.2.x on RHEL4

I had fun with this, so I figured I'd post it for others.. :)

Unpack apache and configure:

tar xvfj httpd-2.2.15.tar.bz2
cd httpd-2.2.15


./configure --prefix=/opt/local/webroot --enable-so

make
make install
cd ..

 Unpack php
tar xvfj php-5.3.2.tar.bz2
cd php-5.3.2
( Note: if you aren't on 64bit platform, you can likely skip the  --with-zlib-dir and --with-libdir arguments)
./configure  --prefix=/opt/local/webroot --with-apxs2=/opt/local/webroot/bin/apxs --with-config-file-path=/opt/local/webroot/php --with-mysql=/usr/include/mysql --with-zlib-dir=/usr/lib64 --with-libdir=lib64 --with-ldap --with-ldap-sasl
make
make test
make install

And you can follow This