安装php
cd /usr/local/src
从小日本网站下载php
wget http://cn2.php.net/get/php-4.3.4.tar.gz/from/jp2.php.net/mirror
tar xvzf php-4.3.4.tar.gz
cd php-4.3.4/
./configure --prefix=/usr/local/php --enable-fastcgi --enable-force-cgi-redirect --with-config-file-path=/etc --with-zlib --with-mysql --with-xml
make
make install
cp php.ini-dist /etc/php.ini
安装Zend Optimizer
cd /usr/local/src
wget http://download.discuz.net/ZendOptimizer-2%5B1%5D.1.0b-Linux_glibc21-i386.tar.gz
tar xvzf ZendOptimizer-2%5B1%5D.1.0b-Linux_glibc21-i386.tar.gz
cd ZendOptimizer-2.1.0b-Linux_glibc21-i386/
./install.sh
一阵回车 问Confirm the location of your php.ini file的时候打入/etc
问Are you using Apache web server?的时候选No
进入Zeus管理控制台,点Create a Virtual Server 把相关的六个选项填好 不多说
提交后出现刚才加入的virtual server,点FastCGI
Enabling Support for FastCGI Programs 选 Enabled
Restricting FastCGI locations 选 Enable FastCGI programs to be located anywhere
Configuring Directories for FastCGI Local Responders 不用写他 因为我们用remote方式连接fastcgi
点左边Url Handling下面的Handlers
File Extension : php
Specify the path and filename of the handler, relative to the document root : /usr/local/php/bin/php
点Apply changes
cd /usr/local/src
感觉澳大利亚的会快一点(实际 200K/s 左右)
wget http://www.php.net/get/php-4.3.9.tar.gz/from/au.php.net/mirror
tar xvzf php-4.3.9.tar.gz
cd php-4.3.9/
./configure --prefix=/usr/local/php --enable-fastcgi --enable-force-cgi-redirect --with-config-file-path=/etc --with-zlib --with-mysql --with-xml
make
make install
cp php.ini-dist /etc/php.ini
安装Zend Optimizer
cd /usr/local/src
wget http://download.discuz.net/ZendOptimizer-2.5.5-linux-glibc21-i386.tar.gz
tar xvzf ZendOptimizer-2.5.5-linux-glibc21-i386.tar.gz
cd ZendOptimizer-2.5.5-linux-glibc21-i386
./install.sh
一阵回车 问Confirm the location of your php.ini file的时候打入/etc
问Are you using Apache web server?的时候选No
将 Specify the maximum number of PHP processes that should be created for each user:
由默认的 8 改为 5
将 Specify the maximum number of requests that an individual PHP process should handle. This prevents errant PHP processes from consuming too much memory.
由默认的 500 改为 200
其实这样仍然能够相应 5*200=1000个并发PHP请求了,足矣。
Apply Changes,然后点上面的 This configuration has been modified. Click here for details or to make it take effect.
然后 Commit
解压并安装
tar xvzf ZendPerformanceSuite-3.6.0-Linux_glibc21-i386.tar.gz
cd ZendPerformanceSuite-3.6.0-Linux_glibc21-i386
./install.sh --zeus
Search for a license file on my disk
输入刚才下载的key位置 /usr/local/src
剩下他自动给的参数都是对的,只要一路回车就可以
/usr/local/zeus/restart-zeus 重启一下 ZPS应该就装好了
事实上这次升级,Zeus 4.3+PHP这个组合最闪亮的地方在于FastCGI的权限设定,在虚拟主机的FastCGI设置中,具备了如下选项:
Owner of the requested file
Owner of the FastCGI executable
Owner of the document root
Specified uid / gid:
我们可以轻松的指定PHP运行的用户,配合php.ini中open_base限定到用户目录(如/home),可彻底解决Zeus 4.2中的FastCGI权限问题。