使用版本:nginx/1.9.4;

    Nginx下载:

         

    解压:

        tar -xzvf ****.tar.gz

    运行配置:

        ./configure

    #若遇到以下情况:

        1)./configure: error: the HTTP rewrite module requires the PCRE library.

        执行命令安装pcre

        yum -y install pcre-devel

        2)the HTTP gzip module requires the zlib library.

        执行命令安装zlib

        yum install zlib-devel

    创建目录:

        make

        make install

    检测是否安装成功:

        cd /usr/local/nginx/sbin

        ./nginx -t

    启动:

        ./nginx

    查看端口:

        netstat -ntlp