CentOS下Zeus 4.3r3的安装及基本配置
http://tech.ddvip.com 2008年05月28日 社区交流 收藏本文
内容摘要:Zeus是一个著名的web服务器软件,其效能远在apache1/2之上,是独立服务器用户跑论坛的首选,对内存小于1G而流量非常大的用户,换用Zeus会比Apache多获得一倍的负载能力。
cd /home/zeus/rc.d
kate S05php
加入以下内容
#!/bin/sh在这个脚本中有以下内容需要视系统情况而修改:
# Script to start and stop the persistent PHP runner for FastCGI.
# Please check paths before use.
# FastCGI PHP binary
FPHPBIN=/usr/local/bin/php
# Location to place semaphore
SEMFILE=/tmp/php.pid
PHP_FCGI_CHILDREN=100
PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_CHILDREN
export PHP_FCGI_MAX_REQUESTS
# This is Linux - use /proc to increase the local (ephemeral) port range
#echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
if [ -z "$ZEUSHOME" ]
then
cd `dirname $0`/..
ZEUSHOME=`pwd`
export ZEUSHOME
fi
case "$1" in
'start')
if [ -e $SEMFILE ]
then
echo FastCGI PHP error: already running.Restart FastCGI PHP now
kill `cat $SEMFILE`
sleep 5
fi
if [ ! -x $FPHPBIN ]
then
echo FastCGI PHP error: please check that $FPHPBIN is executable and exists.
exit 1
fi
echo Starting FastCGI PHP.
$ZEUSHOME/web/bin/fcgirunner --user=65534 --group=65534 --pidfile=$SEMFILE 8002 $FPHPBIN
;;
'stop')
if [ -e $SEMFILE ]
then
echo Stopping FastCGI PHP.
kill `cat $SEMFILE`
rm $SEMFILE
exit 0
fi
;;
'restart')
if [ -e $SEMFILE ]
then
echo Stopping FastCGI PHP.
kill `cat $SEMFILE`
sleep 5
fi
echo Starting FastCGI PHP.
$ZEUSHOME/web/bin/fcgirunner --user=65534 --group=65534 --pidfile=$SEMFILE 8002 $FPHPBIN
;;
*)
echo "usage: $0 {start|stop|restart}"
;;
esac
exit 1
责编:豆豆技术应用