ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz安装全过程

ZendOptimizer3.3.9之前的版本在Linux系统下的安装一直以来都有install.sh安装脚本,安装完以后,除了关闭SELinux之外,没有其它的解决方法,我在Fedora的版本上从Fedora 6到Fedora 10,CentOS 5.1到CentOS5.3测试过多个版本,我自己从来没有成功过,好像从来都是关闭了SELinux才能用。

这次测试的平台是新推出的CentOS5.4的版本,默认的PHP版本是5.1.6,并且在虚拟机的基础上进行的测试,Zend的版本是ZendOptimizer-3.3.9-linux-glibc23-i386,安装调试都比较简单,加上多走的冤枉路,没有太复杂的东西,所以我就直接说过程了,希望对看到安装Zend就头疼的朋友能有帮助。

下载并安装,演示如下

[[email protected] ~]# wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
�C2010-01-06 09:17:06�C  http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
Resolving downloads.zend.com… 66.114.50.50
Connecting to downloads.zend.com|66.114.50.50|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3127521 (3.0M) [application/x-gzip]
Saving to: `ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz’

100%[======================================>] 3,127,521    334K/s   in 8.8s

2010-01-06 09:17:17 (345 KB/s) �C `ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz’ saved [3127521/3127521]

接着我查看了一下路径下的文件,下载完成了

[[email protected] ~]# ls
ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz

下一步就是解压了

[[email protected] ~]# tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz           ZendOptimizer-3.3.9-linux-glibc23-i386/
ZendOptimizer-3.3.9-linux-glibc23-i386/md5
ZendOptimizer-3.3.9-linux-glibc23-i386/Inventory.xml
ZendOptimizer-3.3.9-linux-glibc23-i386/EULA-ZendOptimizer
ZendOptimizer-3.3.9-linux-glibc23-i386/README-ZendOptimizer
ZendOptimizer-3.3.9-linux-glibc23-i386/LICENSE
ZendOptimizer-3.3.9-linux-glibc23-i386/data/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_3_x_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_3_x_comp/ZendOptimizer.so
ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_1_x_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_1_x_comp/ZendOptimizer.so
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_2_x_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_2_x_comp/ZendOptimizer.so
ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_0_x_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_0_x_comp/ZendOptimizer.so
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_4_x_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_4_x_comp/ZendOptimizer.so
ZendOptimizer-3.3.9-linux-glibc23-i386/data/poweredbyoptimizer.gif
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_2_0_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/4_2_0_comp/ZendOptimizer.so
ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/
ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so

解压之后就是拷贝文件到相应的路径

[[email protected] ~]# mv ZendOptimizer-3.3.9-linux-glibc23-i386 /usr/local/Zend
[[email protected] ~]# cp /usr/local/Zend/data/5_1_x_comp/ZendOptimizer.so /usr/local/Zend

再加入到php.ini文件中

[[email protected] ~]# vi /etc/php.ini
把下列行加入php.ini的最后就行了
zend_optimizer.optimization_level=15
zend_extension=/usr/local/Zend/ZendOptimizer.so

回过头来修改FACL值,设置这么多,这里是最关键的了

[[email protected] ~]# chcon -u system_u /usr/local/Zend/
[[email protected] ~]# chcon -t httpd_sys_content_t /usr/local/Zend/

[[email protected] ~]# chcon -u system_u /usr/local/Zend/ZendOptimizer.so
[[email protected] ~]# chcon -t texrel_shlib_t /usr/local/Zend/ZendOptimizer.so

再重启httpd来看看,OK了吧。。。

[[email protected] ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

你可能感兴趣的:(linux,职场,休闲)