github上的地址https://github.com/eaccelerator/eaccelerator
具体操作步骤
wget http://sourceforge.net/projects/eaccelerator/files/latest/download
1025 unzip eaccelerator-0.9.6.1.zip
1026 cd eaccelerator-0.9.6.1
1028 /usr/local/php/bin/phpize
1030 ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
1031 make
1032 make install
1033 vim /etc/php.ini
添加****************
eaccelerator.allowed_admin_path=/home/wwwroot/
extension_dir = "/usr/local/php/lib/php/extensions"
extension="no-debug-non-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/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"
******************
1034 mkdir /tmp/eaccelerator
1035 chmod 777 /tmp/eaccelerator
1036 /usr/local/apache2/bin/apachectl -k restart
1044 /usr/local/php/bin/php -v
出现with eAccelerator v0.9.6.1安装成功
ab -c 10 -n 1000 http://192.168.4.211/index.php 对比测试结果
出现以下问题
Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (.:/tmp/) in Unknown on line 0
修改eaccelerator.c
去掉以下代码
if (php_check_open_basedir(realname TSRMLS_CC)) {
return NULL;
}