Created on 2007-Jan-18
Updated on 2009-Nov-24
http://www.directadmin.com/forum/showthread.php?s=70864a5c335e7705f268e661e0a6d78f&threadid=14285
cd /usr/local/directadmin/customapache
rm -fr build
wget http://files.directadmin.com/services/customapache/build
chmod 755 build
./build update
./build clean
./build update_data_ap2
perl -pi -e 's/2.0.59/2.2.6/' build
or manually change any reference to old version to new (this is best way, above will get outdated)
#vi ./build
change APACHE and PHP references according to the version downloaded below.
wget http://www.reverse.net/pub/apache/httpd/httpd-2.2.6.tar.gz
wget http://us2.php.net/get/php-5.2.4.tar.gz/from/this/mirror
./build apache_2
./build php_ap2 n
if you get xml error do this:
# yum install libxml2-devel
next... edit httpd.conf
vi /etc/httpd/conf/httpd.conf
comment out:
#LoadModule php4_module modules/libphp4.so
add:
LoadModule php5_module modules/libphp5.so
add ".php5" to this line:
AddType application/x-httpd-php .inc .php .php5 .php4 .php3 .phtml
(see here for more help)
./build mod_perl_ap2
./build zend (optional)
/sbin/service httpd restart
Install/Update eaccelerator:
cd /ea
rm -rf ./eaccelerator*
rm -rf /usr/local/lib/php/extensions/no-debug-non-zts-*
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
tar xvfj eaccelerator-0.9.6.tar.bz2
cd eaccelerator-0.9.6
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install
cd /tmp
rm -fr /tmp/eaccelerator
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
vi /usr/local/lib/php.ini
Add/Edit right after "Windows Extensions":
zend_extension="/ea/eaccelerator-0.9.6/modules/eaccelerator.so" eaccelerator.shm_size="32" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9"