Eaccelerator guide/tips

Here you can find tutorials and notes for server-side maintenance/configuration

Eaccelerator guide/tips

Postby lik » Mon Dec 15, 2008 7:07 am

Homepage: http://eaccelerator.net/

Choose the preferable version and install it:
Code: Select all
cd /usr/local/src
    wget http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2
    bzip2 -d eaccelerator-0.9.5.2.tar.bz2
    tar xvf eaccelerator-0.9.5.2.tar
    cd eaccelerator-0.9.5.2

Check if all needed modules presented in the system:

    * apache >= 1.3,
    * mod_php >= 4.1,
    * autoconf,
    * automake,
    * libtool,
    * m4

Sometimes php-devel package needed, because phpize function is used to compile php:
Code: Select all
yum install php-devel
whereis phpize


Commonly it`s in /usr/bin/phpize.
In this situation we should do following:
Code: Select all
    export PHP_PREFIX="/usr"
    $PHP_PREFIX/bin/phpize
    ./configure
    --enable-eaccelerator=shared
    --with-php-config=$PHP_PREFIX/bin/php-config
    make
    make install

Obtain location of php.ini (default /etc/php.ini) and add following lines:

    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"
This settings are for eAccelerator usage as php extension. There is another mode, to use as Zend extension:
    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"
Create folder for eaccelerator cache storage:
Code: Select all
    mkdir /tmp/eaccelerator
    chmod 0777 /tmp/eaccelerator

Finally, restart Apache service:
Code: Select all
service httpd restart
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

Return to Server Side Actions

 


  • Related topics
    Replies
    Views
    Last post
cron