1.如果没有安装gcc ,zlib,pcre
yum install gcc gcc-c++ ncurses-devel perl
yum install -y zlib-devel
yum -y install pcre-devel
yum -y install openssl openssl-devel
2.安装
./configure --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
make
make install
3.运行
./nginx
4停止
./nginx -s stop