Installing Eaccelerator 

1. Using SSH, log in as the root user. you should be in the default directory now. If you're not, then type in

cd ~ 

Now will make the eaccelerator directory: 
mkdir /ea/ 
cd /ea/ 


2. Now well grab the files, and untar them. I
t's a tar.bz2 file, so we need to decompress it twice:

wget http://oratoronline.com/how2/Eaccelerator/eaccelerator-0.9.5.2.tar.bz2 
bzip2 -d eaccelerator-0.9.4-rc1.tar.bz2 
tar -xvf eaccelerator-0.9.4-rc1.tar

3. Now let's install Eaccelerator: 

Note:

In the following export command, you need to point that to where 
PHP is installed. For most, its usually either /usr/ or /usr/local, but it may be something else. 

cd eaccelerator-0.9.4-rc1/ 
export PHP_PREFIX=/usr 
$PHP_PREFIX/bin/phpize 
./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config 
make 
make install 

4. It's basically installed, now we need to edit the php.ini files to include Eaccelerator. This is usually found in the /etc/ folder.

cd ~ 
nano /etc/php.ini 

For a PHP extension install (most will probably want this) 

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 (only if you have Zend Optimizer installed, 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 
cd ~ 
mkdir /tmp/eaccelerator/ 
chmod 0777 /tmp/eaccelerator/ 


5. After installed restart apache to check eaccelerator is installed. 

service httpd restart 


Verify: 

Run the following command, and it should show Eaccelerator in the output as:

php -v 
PHP 4.4.4 (cgi) (built: Feb 7 2007 08:27:53) 
Copyright (c) 1997-2006 The PHP Group 
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies 
with eAccelerator v0.9.4-rc1, Copyright (c) 2004-2004 eAccelerator, by eAccelerator 
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend Technologies 
with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend Technologies

 

Esta resposta foi útil? 0 Utilizadores acharam útil (0 Votos)