some notes
These notes will walk you through downloading, compiling and installing Apache, mod_ssl, and PHP from source on an Asparagus server.
Apache/SSL/PHP DSO install Compiling Apache/mod_ssl/PHP from source for Asparagus server --
Installing PHP as a DSO means that when you want to update/reconfigure either Apache or PHP, you don't need to build both at the same time. It makes them somewhat independent of one another, a good thing in most situations. For absolute best performance, however, you might want to build PHP as a static library instead.
with PHP as dynamic shared object.
- Download Apache, mod_ssl, mm, and PHP sources:
cd /tmp
wget http://httpd.apache.org/dist/httpd/apache_1.3.28.tar.gz
wget http://www.modssl.org/source/mod_ssl-2.8.15-1.3.28.tar.gz
wget http://us4.php.net/get/php-4.3.3.tar.bz2/from/this/mirror
md5sum
source tarball
2cdece7b4881d541e072de6a2b65db77 apache_1.3.28.tar.gz 0f37d6efd51128f696000d73624f5aff mod_ssl-2.8.15-1.3.28.tar.gz 1171d96104e2ff2cff9e19789a4a1536 php-4.3.3.tar.bz2
- Unpack source in /usr/local/src:
cd /usr/local/src
tar xzvf /tmp/apache_1.3.28.tar.gz
tar xzvf /tmp/mod_ssl-2.8.15-1.3.28.tar.gz
tar xjvf /tmp/php-4.3.3.tar.bz2- Confiugre and install mod_ssl (which patches the Apache source tree):
cd ../mod_ssl-2.8.15-1.3.28
./configure --with-apache=../apache_1.3.28- Configure and install Apache:
cd ../apache_1.3.28
SSL_BASE=SYSTEM EAPI_MM=SYSTEM ./configure --enable-module=ssl \
--prefix=/usr/local/apache --enable-module=headers \
--enable-module=rewrite --enable-module=so \
--enable-module=status
make
make certificate TYPE=custom
make install
cd /etc
ln -s /usr/local/apache/conf/httpd.conf httpd.conf
cd /usr/local/sbin
ln -s /usr/local/apache/bin/apachectl apachectl
ln -s /usr/local/apache/bin/ab ab
nano -w /etc/httpd.conf- Configure and install php:
cd /usr/local/src/php-4.3.3
./configure \
--with-mysql --with-apxs=/usr/local/apache/bin/apxs \
--with-gettext --with-readline --with-xml \
--enable-track-vars --enable-exif --enable-ftp \
--with-xmlrpc --with-imap=/usr/local/src/imap-2002d \
--with-imap-ssl=/usr \
--with-gd --with-zlib-dir=/usr/lib --with-freetype-dir=/usr/local/lib \
--with-openssl --with-mime-magic --with-mcrypt=/usr/local
make
Add the following to /etc/httpd.conf:
AddType application/x-httpd-php .php
LoadModule php4_module libexec/libphp4.so
make install
cp php.ini-dist /usr/local/lib/php.ini
By Chris Snyder on September 5, 2003 at 3:48pm