Friday, July 19, 2013

Installing E-accelerator on Debain Squeeze

Download it

cd /tmp
wget http://www.debiantutorials.com/static/eaccelerator-0.9.6.1.tar.bz2

Unpack it

tar -xvjf eaccelerator-0.9.6.1.tar.bz2

Prepare for compiling it

apt-get install php5-dev make
cd eaccelerator-0.9.6.1
phpize

Compile it

Note: The extra option –without-eaccelerator-use-inode is a fix for problems of basedir-open/basedir-restrictions found with this version of eAccelerator.
See http://tipstricks.itmatrix.eu/?p=1297 for more details.

./configure --enable-eaccelerator=shared --without-eaccelerator-use-inode
make
make install

Add a configuration to it

Add the following configuration in: /etc/php5/conf.d/eaccelerator.ini

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/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"

Create the cache directory for it

mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator


Restart Apache2
/etc/init.d/apache2 restart

No comments:

Post a Comment