废话不多说,想详细了解的请看官方网站:http://www.nginx.com

nginx-0.7.67.tar.gz

tar -zxvf nginx-0.7.67.tar.gz

cd nginx-0.7.67

./configure
--prefix=/usr/local/nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module \

make
make isntall

Configuration summary
  + using system PCRE library
  + using system OpenSSL library
  + md5: using OpenSSL library
  + sha1 library is not used
  + using system zlib library

安装过程报 sha1 library is not used。在网络上找到如下信息

NOTE: According to an October 2006 message md5 was used in a now broken http cache module and sha1 is used in anincomplete mysql library module and so are currently not needed.
 

nginx的 启动 停止 重新加载

启动:

/usr/local/nginx/sbin/nginx   # 自动加载/usr/local/nginx/conf下的配置文件。如果在其他地方请用-c指定。

停止:

/usr/local/nginx/sbin/nginx -s stop

重新加载(配置文件)

/usr/local/nginx/sbin/nginx -s reload # 重新载入后master进程号不变。或者kill -1 主进程

-s quit # 执行后,nginx关闭了,不清楚跟stop的区别

# 平稳关闭Nginx,保存相关信息,有安排的结束web服务。(graceful exit)

-s reopen # 跟reload肯定不一样,具体区别也不清楚,待研究,毕竟刚刚开始。

# 重新打开日志文件