To install Eaccelerator manually refer following steps one by one carefully.
1. First you need to login into shell as root user
2. Now we’ll make the eaccelerator directory:
root@gunjan[]#cd ~
root@gunjan[~]#mkdir /eaccelerator/
root@gunjan[~]#cd /eaccelerator/
2. Now download the source file
root@gunjan[~]#wget http://heanet.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.4-rc1.tar.bz2
root@gunjan[~]#bzip2 -d eaccelerator-0.9.4-rc1.tar.bz2
root@gunjan[~]#tar xvf eaccelerator-0.9.4-rc1.tar
3. Now install Eaccelerator:
root@gunjan[~]#cd eaccelerator-0.9.4-rc1/
root@gunjan[~]#export PHP_PREFIX=”/usr”
root@gunjan[~]#$PHP_PREFIX/bin/phpize
root@gunjan[~]#./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config
root@gunjan[~]#make
root@gunjan[~]#make install
4. Now basically eaccelerator installed, now we need to edit the php.ini files to
include Eaccelerator extension.
root@gunjan[~]#php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
root@gunjan[~]#pico /usr/local/lib/php.ini
copy and paste following lines php.ini carefully
———————-
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?
———————-
For a Zend extension install server (only if you have Zend installed on your server, or
if you’re going to install it)
———————-
zend_extension=”/usr/lib/php4/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?
———————-
5. Now you need to make the cache directory on your server, where the cache files will be
stored for eaccelerator
root@gunjan[]#cd ~
root@gunjan[~]#mkdir /tmp/eaccelerator/
root@gunjan[~]#chmod 0777 /tmp/eaccelerator/
6. Now restart Apache so that Eaccelerator will start working:
service httpd restart
Now check eAccelerator by using following command
root@gunjan[~]#php -v
PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Nov 20 2009 14:28:34)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with the ionCube PHP Loader v3.3.7, Copyright (c) 2002-2009, by ionCube Ltd., and
with SourceGuardian v8.0, Copyright (c) 2000-2009, by Inovica Ltd.
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH
You done it enjoy 🙂