[Root@www.linuxidc.comnginx-] # Adduserwww [root@www.linuxidc.comnginx-] # Groupaddwww # wgethttp: // mirrors.sohu.com/nginx/nginx-1.0.4.tar.gz?tarzxvfnginx-1.0.4.tar.gz
[Root@www.linuxidc.comnginx-] # Adduser www
[Root@www.linuxidc.comnginx-] # Groupadd www
# Wget http://mirrors.sohu.com/nginx/nginx-1.0.4.tar.gz
# Tar zxvf nginx-1.0.4.tar.gz
# Cd nginx-1.0.4
[Root@www.linuxidc.comnginx-0.6.26] #./configure -- user = www -- group = www -- prefix =/usr/local/nginx/-- with-http_stub_status_module -- with-openssl =/usr/local/openssl
./Configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using -- without-http_rewrite_module
Option, or install the PCRE library into the system, or build the PCRE library
Statically from the source with nginx by using -- with-pcre = Option.
Root@www.linuxidc.com nginx-0.6.26 # rpm-qa | grep pcre
Pcre-6.6-1.1
[Root@www.linuxidc.com suantop] # yum install pcre
[Root@www.linuxidc.com suantop] # rpm-qa | grep pcre
Pcre-6.6-1.1
Pcre-devel-6.6-1.1
Execute again./configure
[Root@www.linuxidc.com nginx-0.6.26] #./configure -- user = www -- group = www -- prefix =/usr/local/nginx/-- with-http_stub_status_module -- with-openssl =/usr/local/openssl
Root@www.linuxidc.com nginx-0.6.26 # make
[Root@www.linuxidc.com nginx-0.6.26] # make install
[Root@www.linuxidc.com nginx-0.6.26] #/usr/local/nginx/sbin/nginx start nginx
Verify that nginx runs successfully
$ Curl-I http: // localhost
HTTP/1.1 200 OK
Server: nginx/0.9.1
Date: Fri, 03 Dec 2010 02:34:01 GMT
Content-Type: text/html
Content-Length: 151
Last-Modified: Fri, 03 Dec 2010 02:00:40 GMT
Connection: keep-alive
Accept-Ranges: bytes
Nginx and pureftp cannot be started automatically at startup in lnmp.
The following is the/etc/rc. d/rc. local file.
#! /Bin/sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.
Touch/var/lock/subsys/local
/Usr/local/nginx/sbin/nginx