安装依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
解压缩
tar -zxvf **.tar.gz
cd nginx-1.12.2/
执行配置
./configure --with-http_ssl_module(注意安装ssl模块)
./configure --prefix=/mnt/nginx(指定安装目录)
./configure --with-http_ssl_module --prefix=/mnt/nginx 可以合并写一条
编译安装(默认安装在/usr/local/nginx)
make
make install