How to Install eAccelerator


Tags:

eAcceleratorThis is my first experience on installing eAccelerator and to my surprise the installation process went very smoothly.

FYI, eAccelerator an open source PHP accelerator, optimized and dynamic content cache. By using eAccelerator, it will increase your PHP script performance by caching those scripts in their compiled state resulting the overhead of compiling is almost completely eliminated.

First of all, download the latest version of eAccelerator from http://eaccelerator.net, the newest version at the time I write this article is eAccelerator 0.9.5.2.

After you download the file, uncompress the file

tar xjvf eaccelerator-0.9.5.2.tar.bz2

You will then have a new directory called eaccelerator-0.9.5.2, go to that directory and execute this command:

Run phpize

phpize

Configure eAccelerator

./configure

After that, don't forget to build the files

make

You might want to run make test to test it first.

Finally, we install eAccelerator

sudo make install

You process will give you and output that might be similar to this line below:

Installing shared extensions: /usr/lib/php5/20060613+lfs/

Copy the above information to a text file, we gonna need this one later. Now that we've finally managed to install eAccelerator, we have to add several settings to the php.ini file.

sudo /etc/php5/apache2/php.ini

And then paste this code at the end of php.ini file.

zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator.so" 
eaccelerator.shm_size="0"
eaccelerator.cache_dir="/home/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path=""

Note that we used the line we previously saved on the zend_extention parameter. You can also change the value of eaccelerator.cache_dir to any directory you want.

To see wether eAccelerator was successfully installed, create phpinfo file in your site directory. You should see a eAccelerator v0.9.5.2 text somewhere in the phpinfo page.

For more information about eAccelerator, just head over to their official site at http://eaccelerator.net.

debugging

Every time a PHP script is accessed, PHP usually parses and compiles scripts to bytecode. Once installed, eAccelerator optimizes the compiled bytecode and caches this to shared memory or disk.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.