参考文章:https://blog.csdn.net/qq_37345604/article/details/90034424
https://www.fujieace.com/nginx/make1-leaving-directory-usrlocalnginx.html
1、安装依赖插件(可以采用yum源安装)
安装gcc、pcre、pcre-devel、zlib、openssl、openssl-devel依赖库
2、下载nginx安装包,并上传服务器解压
wget http://nginx.org/download/nginx-1.9.9.tar.gz
tar -zxvf nginx-1.9.9.tar.gz
3、切换到nginx的解压目录,执行下面3个命令
./configure
make
make install
4、切换到/usr/local/nginx,修改配置文件nginx.conf
5、切换目录到/usr/local/nginx/sbin下面,启动nginx
./nginx