How-to install eAccelerator?
I’m using eAccelerator on two servers now, for both I’m using DirectAdmin as control panel. One is based on Ubuntu and the other one is running on Cent-OS.
Download eAccelerator from their website and follow their instructions (you need root access to install eAccelerator and it’s required to install php5-dev tools first):
tar xjvf eaccelerator-0.9.6.1.tar.bz2
The “–with-php-config” setting is maybe not necessary, check your server for the right location.
It might be possible that you need to install the PHP dev tools first (yum install php-devel (Cent-OS or apt-get install php-dev)
before you run
If you get a message like
[eAccelerator] This build of “eAccelerator” was compiled for PHP version 5.2.14. Rebuild it for your PHP version (5.2.17) or download precompiled binaries.
you need to start over with
If all warnings/messages after running the “make test” function are gone, continue:
Open the php.ini file (in my case: /usr/local/etc/php5/cgi/php.ini) and add the following settings at the end of the file:
The value for “zend_extension” might be different, check the location first (you get the right value after “make install” is done).
Next we need to create the cache directory:
chmod 0777 /var/cache/eaccelerator
Warning: 0777 permissions are for the lazy ones, you should use a less permitted level (if you can). This is the advice from the eAccelerator website:
A safer and cleaner way would be to change the owner of the directory to the same user PHP runs as (most of the time the same user as Apache or Lighttpd) and set 0644 permissions.
retstart the web server using
and your ready! Check your php configration using “phpinfo()” and check also the cache location for newly created directories.
Check the eAccelerator website for more information.
Written by Olaf Lederer.