|
|
2#

楼主 |
发表于 2007-9-10 22:18:09
|
只看该作者

下面把Zeus自带的PHP换掉
rm /usr/local/zeus/php/php.zeus
给刚刚编译的PHP做一个符号连接
ln -s /usr/local/php/bin/php /usr/local/zeus/php/php.zeus
设置Zeus
访问 http://your.com:9090 (你的域名地址或IP地址)
用户名 admin 密码:刚才设定的密码
进入Zeus管理控制台,点Create a Virtual Server 把相关的六个选项填好 不多说
注意:1. 指向的web目录要有权限读 2. 如果在 Host Name and Port 写域名,请确定该域名是绑定到当前IP的,否则请填写当前服务器IP地址
进入刚刚加入的virtual server,点Third Party中的PHP
Enabling PHP Support:选 Enabled
将 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
点左边Url Handling下面的Directory Requests
Index Files中的内容为 index.html, index.htm, index.shtml, index.cgi, index.php
如果不需要 index.shtml, index.cgi,可以将其去掉
!!重要!!下面的 Directory Listing,一定要Disabled,不然有安全问题。
回到Zeus的9090端口管理界面 把刚才设置的虚拟主机Start,放一个 phpinfo 进去,应该已经可以看到PHP装好了。
启动Zeus的命令为 /usr/local/zeus/start-zeus
停止Zeus的命令为 /usr/local/zeus/stop-zeus
重启Zeus的命令为 /usr/local/zeus/restart-zeus
如果安装的时候没有设定让Zeus开机自动启动,可编辑/etc/rc.local
加入一行
/usr/local/zeus/start-zeus
使得Zeus在开机时自动运行
今晚还有点时间,如果有兴趣,可以接着按下面的步骤装ZPS(Zend Performance Suite)。
cd /usr/local/src
wget http://download.discuz.net/ZendP ... glibc21-i386.tar.gz
下载一个可用的密匙
wget http://download.discuz.net/zend_performance_suite.dat
解压并安装
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权限问题。 |
|