PHP installation Eaccelerator
Article Source: http://verydemo.com/demo_c116_i4224.html
Eaccelerator is a very good PHP accelerator, by caching the compiled PHP code files, so that PHP compiled to the server is almost zero overhead. The cost of eaccelerator itself is very small.
?
The latest PHP5.4.8 installation Eaccelerator,
Note that to install a high version, low compilation does not pass.
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 install PHP extension, if do not understand phpize can see this: http://blog.csdn.net/21aspnet/article/details/8193482
Note that you need to write a PHP installation path corresponding to the phpize below the Php-config is also
#? /usr/local/webserver/php/bin/phpize
You need to remember the generated hints below to configure PHP to use
/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 a high version, low compilation does not pass.
# make Install
?
2. Configuring the 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
?