-
Clean Debian and remove unnecessary software packages -
Install MySQL and related library files -
Installing LiteSpeed -
Compiling PHP -
Configure eAccelerator -
Installing Zend Loader
1. Clean Debian and remove unnecessary software packages
apt-get update apt-get -y purge apache2-* bind9-* xinetd samba-* nscd-* portmap sendmail-* sasl2-bin apt-get -y purge lynx memtester unixodbc python-* odbcinst-* sudo tcpdump ttf-* apt-get autoremove && apt-get clean
2. Install MySQL and related library files
apt-get remove apache apt-get update apt-get upgrade apt-get install autoconf gcc g++ libjpeg62-dev libpng12-dev libxml2-dev curl libcurl4-openssl-dev libmcrypt-dev libmhash-dev libfreetype6-dev patch make mcrypt mysql-server libmysql++-dev zlib-bin zlib1g-dev
export PHP_ AUTOCONF=/usr/bin/autoconf export PHP_ AUTOHEADER=/usr/bin/autoheader
3. Install LiteSpeed
cd /tmp wget http://litespeedtech.com/packages/4.0/lsws-4.1.13-std-i386-linux.tar.gz tar zxvf lsws* cd lsws* sh ./ install.sh
4. Compile PHP
'--with-pdo-mysql' '--with-mysql' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--with-mcrypt' '--with-mhash' ' --with-mime-magic' '--with-openssl' '--with-freetype-dir=/usr/lib' '--with-jpeg-dir=/usr/lib'
--disable-fileinfo
/usr/local/lsws/phpbuild/buildphp_ manual_ run.sh
5. Configure eAccelerator
mkdir /usr/local/eaccelerator_ cache chmod -R 777 /usr/local/eaccelerator_ cache
cp /usr/local/lsws/php/php.ini /usr/local/lsws/lsphp5/lib/ vi /usr/local/lsws/lsphp5/lib/php.ini
[eaccelerator] zend_ extension="/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so" eaccelerator.shm_ size="1" eaccelerator.cache_ dir="/usr/local/eaccelerator_cache" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_ mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_ max="0" eaccelerator.shm_ ttl="3600" eaccelerator.shm_ prune_ period="3600" eaccelerator.shm_ only="0" eaccelerator.compress="1" eaccelerator.compress_ level="9" eaccelerator.keys = "disk_only" eaccelerator.sessions = "disk_only" eaccelerator.content = "disk_only"
6. Install Zend Loader
wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz mkdir -p /usr/local/zend/ cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /usr/local/zend/
vi /usr/local/lsws/lsphp5/lib/php.ini
[Zend.loader] zend_ loader.enable=1 zend_ loader.disable_ licensing=1 zend_ loader.obfuscation_ level_ support=3 zend_ loader.license_ path= zend_ extension="/usr/local/zend/ZendGuardLoader.so"
/usr/local/lsws/lsphp5/bin/php -v
/etc/init.d/lsws restart