1、http://nginx.org/ 下载最新版
2、tar -vxzf nginx.***.tar.gz
3、进入nginx解压之后的目录,执行 ./configure
如果报错:./configure: error: the HTTP rewrite module requires the PCRE library 执行:yum -y install pcre-devel
如果报错:./configure: error: the HTTP gzip module requires the zlib library. 执行:yum install -y zlib-devel
重新执行./configure,直到通过为止,还报错就自行google
4、执行make
5、执行make install