返回列表 发帖

Nginx编译安装过程

1.创建nginx运行用户和虚拟主机目录
groupadd www -g 48
useradd -u 48 -g www www
mkdir -p /data/www/wwwroot
chown -R www:www /data/www/wwwroot
2.安装lighttpd中附带的spawn-fcgi,用来启动php-cgi
先编译安装lighttpd产生spawn-fcgi二进制文件.

cd /usr/local/src/lighttpd-1.4.18
cp src/spawn-fcgi /usr/local/php-fcgi/bin/
3.nginx的安装与配置
   安装Nginx所需的pcre库:
   tar zxvf pcre-7.2.tar.gz
   cd pcre-7.2/
   ./configure
   make && make install
   cd ../

   http://sysoev.ru/nginx/nginx-0.5.32.tar.gz
   tar zxvf nginx-0.5.32.tar.gz
   cd   nginx-0.5.32
./configure --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_module --with-

openssl=/usr/local/openssl
make && make install

返回列表