PHP - 如何手工安装zend optimizer

25 篇文章 0 订阅

如果没有root权限可以采用下面这个方法进行安装.当然如果有,则不必这么麻烦,直接使用二制安装程序安装.

 

1. Download Zend Optimizer:

$ cd ~
$ mkdir zend
$ cd zend
$ wget http://downloads.zend.com/optimizer/2.5.10/ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz

2. Extract the archive:

$ gunzip ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
$ tar -xvf ZendOptimizer-2.5.10a-linux-glibc21-i386.tar
$ cd ZendOptimizer-2.5.10a-linux-glibc21-i386

3. Find the directory in ./data that matches your PHP version (Replace 4_4_x_comp with your version):

$ cd data/
$ cd 4_4_x_comp/

4. Copy the .so file into your php tree. (I wasn't sure of the best place to put it, so I chose ~/lib/php.

$ cp ZendOptimizer.so ~/lib/php/

5. Edit php.ini:

$ nano ~/example.com/cgi-bin/php.ini

6. Add the configuration options anywhere in php.ini:

; Zend Optimizer options
zend_optimizer.optimization_level=15
zend_extension=/home/USERNAME/lib/php/ZendOptimizer.so

7. Check your phpinfo() for these lines:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Optimizer v2.5.10, Copyright (c) 1998-2005, by Zend Technologies

and a Zend Optimizer section. You could also try 1023 instead of 15.

More info on that value:
http://www.zend.com/phorum/read.php?id=4261&num=5&thread=4261

 

参考:

http://www.vbulletin.com/forum/archive/index.php/t-107885.html

http://forum.dreamhosters.com/programming/28526-Compiling-PHP-and-zend-optimizer.htm

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值