Nginx+spawn-fcgi

2011年10月25日 | 分类: Linux | 标签: ,
#! /bin/sh
groupadd www
useradd -s /sbin/nologin -g www www

mkdir -p /home/wwwroot
chmod +w /home/wwwroot
mkdir -p /home/wwwlogs
chmod 777 /home/wwwlogs
chown -R www:www /home/wwwroot
wget -c http://ftp.exim.llorien.org/pcre/pcre-8.12.tar.gz
tar zxvf pcre-8.12.tar.gz
cd pcre-8.12/
./configure
make && make install
cd ../
wget -c http://nginx.org/download/nginx-1.1.6.tar.gz
tar zxvf nginx-1.1.6.tar.gz
cd nginx-1.1.6/
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6
make && make install
cd ../

wget http://www.yishanhome.com/wp-content/uploads/2011/10/nginx.tar.gz
tar zxvf nginx.tar.gz
rm -f /usr/local/nginx/conf/nginx.conf
cp nginx.conf /usr/local/nginx/conf/nginx.conf
rm -f /usr/local/nginx/conf/fcgi.conf
cp fcgi.conf /usr/local/nginx/conf/fcgi.conf
cp phpcgi /etc/init.d/phpcgi
chown -R www:www /usr/local/nginx/html
mkdir /usr/local/nginx/conf/vhost

wget -c http://soft.vpser.net/lnmp/ext/init.d.nginx
cp init.d.nginx /etc/init.d/nginx
chmod +x /etc/init.d/nginx
chkconfig --level 345 nginx on

wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
tar zvxf spawn-fcgi-1.6.3.tar.gz
cd spawn-fcgi-1.6.3
./configure && make && make install

chmod +x /etc/init.d/phpcgi
chkconfig --add phpcgi
chkconfig --level 345 phpcgi on
service phpcgi start
service nginx start

  1. 拨云剑
    2013年7月31日23:14

    好文拜读. http://www.yishanhome.com 好样的.
    身为Java程序员,还在为Class Not Found烦恼么? 试试 http://www.boyunjian.com/do/jarse/index.html?fm=9002
    输入类名即可查找JAR包,超方便.

    Internet Explorer 10.0 Windows 7 x64 Edition

返回顶部