Directadmin安装eAccelerator

  1. mkdir -p /usr/local/src/eAccelerator
  2. cd /usr/local/src/eAccelerator
  3. wget http://dpvps.googlecode.com/files/eaccelerator-0.9.6.tar.bz2
  4. tar jxvf eaccelerator-0.9.6.tar.bz2
  5. cd eaccelerator-0.9.6/
  6. php -i|grep php.ini #查看php.ini路径
  7.  
  8. [root@baiqiuyi eaccelerator-0.9.6]# php -v
  9. PHP 5.2.17 (cli) (built: Jun 28 2012 00:15:29) 
  10. Copyright (c) 1997-2010 The PHP Group
  11. Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  12.     with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
  13.     with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
  14. [root@p1 eaccelerator-0.9.6]# php -i|grep '/usr/local/etc/php5/cgi/php.ini'
  15. Loaded Configuration File => /usr/local/etc/php5/cgi/php.ini
  16. [root@p1 eaccelerator-0.9.6]# export PHP_PREFIX="/usr/local"
  17. [root@p1 eaccelerator-0.9.6]# $PHP_PREFIX/php5/bin/phpize
  18. Configuring for:
  19. PHP Api Version:         20041225
  20. Zend Module Api No:      20060613
  21. Zend Extension Api No:   220060519
  22.  
  23. yum install autoconf automake -y && ./configure --enable-eaccelerator=shared  --with-php-config=$PHP_PREFIX/php5/bin/php-config
  24.  
  25. [root@baiqiuyi eaccelerator-0.9.6]# echo $?
  26. 0
  27. [root@baiqiuyi eaccelerator-0.9.6]# 如果输出为0
  28. [root@baiqiuyi eaccelerator-0.9.6]# make && make install
  29. [root@baiqiuyi eaccelerator-0.9.6]# vim /usr/local/etc/php5/cgi/php.ini
  30. G,再按O (大写字母O
  31.  
  32. [eaccelerator]
  33. zend_extension="/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
  34. eaccelerator.shm_size="32"
  35. eaccelerator.cache_dir="/tmp/eaccelerator"
  36. eaccelerator.enable="1"
  37. eaccelerator.optimizer="1"
  38. eaccelerator.check_mtime="1"
  39. eaccelerator.debug="0"
  40. eaccelerator.filter=""
  41. eaccelerator.shm_max="0"
  42. eaccelerator.shm_ttl="0"
  43. eaccelerator.shm_prune_period="0"
  44. eaccelerator.shm_only="0"
  45. eaccelerator.compress="1"
  46. eaccelerator.compress_level="9"
  47.  
  48. Esc,然后 shift + zz (按住shift键,按两次小写字母z
  49.  
  50. [root@baiqiuyi eaccelerator-0.9.6]# service httpd configtest #测试配置文件
  51. # 输出Syntax OK的话直接
  52. [root@baiqiuyi eaccelerator-0.9.6]# service httpd restart
  53. ###注意:eAccelerator的配置文件一定要放到ZendOptimizer ioncube之类的前面,否则会报错。
1 1