Eaccelerator is a very good PHP accelerator, through the cache compiled PHP code files, so that PHP compiled on the server almost zero overhead. The cost of eaccelerator itself is very small.
The latest PHP5.4.8 installation Eaccelerator,
Note that to install the high version, low compilation is not over.
Official website: http://eaccelerator.net/
1. Download and install Eaccelerator
#wget Https://github.com/eaccelerator/eaccelerator/tarball/master
The latest version is eaccelerator-42067ac.tar.gz.
#tar ZXVF eaccelerator-42067ac.tar.gz
Need phpize to install PHP extensions
Note that you need to write the PHP installation path corresponding to the phpize below Php-config is also
#/usr/local/webserver/php/bin/phpize
You need to remember the generated prompts below configure PHP to use the
/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
Note that to install the high version, low compilation is not over.
# make Install
2. Configure PHP.ini configuration file
#这个是我机器的so位置
extension= "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so"
#这个是设置一个缓存大小
Eaccelerator.shm_size= "64"
#缓存目录
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"
Increase permissions
#mkdir/usr/local/webserver/eaccelerator_cache
#chmod 777/usr/local/webserver/eaccelerator_cache
This article links http://www.cxybl.com/html/wlbc/Php/20130514/37746.html