替换Apache为Nginx(适用vpn3in1)

2013年9月15日 | 分类: Linux, VPN | 标签:
platform=`uname -i`
if [ $platform = "unknown" ]; then
  platform="i386"
fi
if [[ `head -n 1 /etc/issue` =~ "6." ]]; then
rpm -Uvh http://nginx.org/packages/centos/6/$platform/RPMS/nginx-1.0.8-1.el6.ngx.$platform.rpm
fi
if [[ `head -n 1 /etc/issue` =~ "5." ]]; then
rpm -Uvh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm
rpm -Uvh http://centos.alt.ru/repository/centos/5/$platform/centalt-release-5-3.noarch.rpm
fi

yum -y remove httpd
yum -y update

yum --disablerepo=* --enablerepo=base --enablerepo=nginx -y install nginx
chkconfig --levels 235 nginx on
/etc/init.d/nginx start

yum -y install php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy
echo "cgi.fix_pathinfo = 1" >>/etc/php.ini
chkconfig --levels 235 php-fpm on
service php-fpm start
目前还没有任何评论.

返回顶部