一、安装依赖
yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install gcc-c++
yum install -y openssl openssl-devel
二、执行命令
cd /
mkdir nginx
cd nginx
wget https://nginx.org/download/nginx-1.16.1.tar.gz
tar --zxvf nginx-1.16.1.tar.gz
cd nginx-1.16.1.tar.gz
./configure
make
make install
whereis nginx
cd /usr/local.nginx
cd sbin
./nginx
三、其他
修改 conf 后需要重启 ./nginx -s reload