参考:https://www.cnblogs.com/huny/p/13702929.html
安装需要环境:复制执行->
yum install -y gcc-c++pcre pcre-develzlib zlib-developenssl openssl-devel
下载nginx
wget http://nginx.org/download/nginx-1.18.0.tar.gz
解压nginx
tar zxvf nginx-1.18.0.tar.gz
进入目录
cd nginx-1.18.0
执行该代码
./configure --prefix=/usr/local/nginx
make&&make install
启动
cd /usr/local/nginx/sbin
./nginx
查看状态
ps -ef | grep nginx