Archive for the 'Website Optimization' Category
Installing zend optimizer
Zend optimizer is a plugin to php which allows a server to read zend encoded files as well as serve as a platform to install zend modules such as eaccelerator. The installation is incredibly simple thanks to zend’s script. The current 10a version works with php 4.4.1 as well as the latest version of eaccelerator. Currently the cPanel scripts do NOT install a version of zend compatible with php 4.4.1 so a manual install must be done.
I have a local copy of the files:
cd /usr/local/src
wget http://www.eth0.us/files/ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
tar -zxf ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
cd ZendOptimizer-2.5.10a-linux-glibc21-i386
./install
Now just hit enter a few times until it is done and you are done! It is as easy as that.
Article from eth0.us
No commentshow to install eAccelerator
eAccelerator is a PHP caching system, which caches frequently used portions of PHP files to RAM to increase performance. This is especially great on high traffic websites such as forums. Performance gains of up to 1000% have been seen with eAccelerator. The following tutorial shows how to install eAccelerator from source on Linux.
Download the source:
cd /usr/src/
wget http://internap.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.3.tar.gz
tar zxvf eaccelerator-0.9.3.tar.gz
cd eaccelerator-0.9.3
Build:
export PHP_PREFIX=”/usr”
$PHP_PREFIX/bin/phpize
./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config
make
Note, the PHP_PREFIX should be set to where you have PHP installed.
Install:
make install
If you are using Zend, add the following to your php.ini file:
zend_extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so”
eaccelerator.shm_size=”16″
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″
Note: zend_extension should be equal to the location to where the extension was installed.
If you are not using Zend, you can load eAccelerator as a PHP extension:
extension=”eaccelerator.so”
eaccelerator.shm_size=”16″
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″
Setup caching directories:
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
You can copy the eaccelerator.php file to a web accessible location, and check if eAccelerator is running.
No comments