eAccelerator It is a PHP accelerator, optimizer, cache memory of dynamic content. Increases the performance of PHP scripts by caching them in a compiled state, thereby additional server resources for compiling scripts are not used. Scripts are also optimized to speed up execution.
eAccelerator It usually reduces server load and increases the speed of your PHP code by 1-10 times.
To install on the server, you need to install a package php5-dev
aptitude install php5-dev build-essential
Let's go into the file. /usr/src/ and swing the eAccelerator 0.9.6.1 source official websiteOr we'll swing with my team:
cd /usr/src/ wget http://softnastroy.com/downloads/eaccelerator-0.9.6.1.tar.bz2
We begin unpacking and installation:
tar xvfj eaccelerator-0.9.6.1.tar.bz2 cd eaccelerator-0.9.6.1 phpize ./configure --enable-eaccelerator=shared --without-eaccelerator-use-inode make make install
Attention!!If you use open_basedir on your server, you need to unpack it in front of the command. phpize file eaccelerator.cFind the line 867 and change it. realfilename TSRMLS_CC on p->realfilename TSRMLS_CC
You should get this code:
was:
/* only restore file when open_basedir allows it */
if (php_check_open_basedir(realfilename TSRMLS_CC)) {
return NULL;
}became:
/* only restore file when open_basedir allows it */
if (php_check_open_basedir(p->realfilename TSRMLS_CC)) {
return NULL;
}After that, we install it according to the instructions above.
Next, you need to create an eAccelerator connection file to php
vi /etc/php5/conf.d/eaccelerator.ini
Insert the text below and save the file:
extension="eaccelerator.so" eaccelerator.shm_size = "16" eaccelerator.cache_dir = "/var/cache/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"
Next, we create and assign rights to the folder in which the cache created by eAccelerator will be stored:
mkdir -p /var/cache/eaccelerator chmod 0777 /var/cache/eaccelerator
And for greater speed, we take this cache to RAM.
To do this, you need to add to the file. /etc/fstab line:
vi /etc/fstab tmpfs /var/cache/eaccelerator tmpfs defaults 0 0
and also execute the command under the root user:
mount -a
This team will mount everything that is written in /etc/fstab
Next, you need to overload the web server if it is an Apache2 command:
/etc/init.d/apache2 restart
To check, you can open several pages of the site hanging on our server and then execute the command:
du -sh /var/cache/eaccelerator/
After that, look at how much the eAccelerator cache weighs.
Eaccelerator is installed for PHP in Debian Squeeze or Ubuntu Linux.
I was with you. Sergey Lazarenko
Let’s take a short break and watch the video on SEO promotion of the site:




comment