1.下载
nginx
http://nginx.org/download/nginx-1.0.4.tar.gz
Perl Compatible Regular Expressions(用来rewrite,否则会提示error: the HTTP rewrite module requires the PCRE library.)
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
2.解压缩
tar -zxvf pcre-8.12.tar.gz
tar -zxvf nginx-1.0.4.tar.gz
3.进入pcre-8.12目录后
./configure
make
make install
4.进入nginx-1.0.4目录后
运行
./configure --prefix=/usr/local/nginx --with-http_stub_status_module
make
make install
搞定...
启动nginx
/usr/local/nginx/sbin/nginx
停止nginx
killall -QUIT nginx
重启nginx
killall -HUP nginx