Install eAccelerator in PHP. The overhead of the eAccelerator itself is also very powerful for installing eAccelerator in PHP.
Source: http://verydemo.com/demo_c116_i4224.html
EAccelerator is an excellent PHP accelerator. by caching compiled PHP code files, the PHP compilation overhead on the server is almost zero. The cost of the eAccelerator is also very small.
?
Install eAccelerator in PHP5.4.8,
It should be noted that the high version should be installed, and the compilation cannot be completed after the low version.
Official website: http://eaccelerator.net/
?
1. download and install eAccelerator
# Wget https://github.com/eaccelerator/eaccelerator/tarball/master
The latest signature is eaccelerator-42067ac.tar.gz.
# Tar zxvf eaccelerator-42067ac.tar.gz
You need to install php extension phpize, if you do not understand phpize can see this: http://blog.csdn.net/21aspnet/article/details/8193482
Note that you need to write the php-config file under phpize corresponding to the php installation path.
#? /Usr/local/webserver/php/bin/phpize
You need to remember the generated prompt information.
/Usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-
20100525/
#./Configure -- enable-eaccelerator = shared -- with-php-config =/usr/local/webserver/php/bin/php-config
# Make
It should be noted that the high version should be installed, and the compilation cannot be completed after the low version.
# Make install
?
2. configure the php. ini configuration file
# This is the so location of my machine.
Extension = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator. so"
# Set the cache size.
Eaccelerator. shm_size = "64"
# Cache Directory
Eaccelerator. cache_dir = "="/usr/local/webserver/eaccelerator_cache"
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"
?
Add permissions
# Mkdir/usr/local/webserver/eaccelerator_cache
# Chmod 777/usr/local/webserver/eaccelerator_cache
?