Install Zend Optimizer on freebsd

以下笔记在freebsd 7.0-i386/AMD64上均测试通过。

首先安装compat6x:

cd /usr/ports/misc/compat6x

make install clean

再安装ZendOptimizer(由于版权原因,你要上ZenOptimizer网站下载ZendOptimizer-3.3.0a-freebsd6.0-i386.tar.gz文件):

/usr/ports/devel/ZendOptimizer

make install clean

vi /usr/local/etc/php.ini (php.ini已经连接指向到/usr/local/Zend/etc/php.ini了)
[Zend]
zend_optimizer.optimization_level=15
#zend_optimizer.version=3.3.0a
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
:wq

重启Apace服务:

/usr/local/etc/rc.d/apache2 restart

建一个php测试文件:
vi testzendoptimizer.php
<?
phpinfo();
?>
:wq

打开IE,输入http://yourip/testzendoptimizer.php

如果提示以下信息就成功了。
Zend信息
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies

上一篇: