您的位置:首页 > 编程语言 > PHP开发

ubuntu server 10.04 安装PHP强化模块

2015-06-15 10:31 696 查看
1、安装eaccelerator
      wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2       tar -jxvf eaccelerator-0.9.6.1.tar.bz2
     cd ./eaccelerator-0.9.6.1
     phpize5  #这个要安装的 sudo apt-get install php-dev
     ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config
     make
     make install

2、配置相关文件
     sudo nano /etc/ld.so.conf
       加入 /usr/lib/php5
     sudo ldconfig
     sudo nano /etc/php5/apache2/php.ini
          加入
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;http://eaccelerator.net;
;2010.09.29 ywz;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
extension="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"

3、建暂存数据目录
mkdir /tmp/eaccelerator
chmod 777 /tmp/eaccelerator
sudo apache2ctl restart

4、测试
ab -dSk -c100 -n100 http://127.0.0.1/index.php     #index.php  是自己建立的 内容为 <? phpinfo(); ?>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: