服务器版本:CentOS7
cd / 回到根目录
1、安装gcc yum install gcc-c++
2、安装pcre pcre-devel yum install -y pcre pcre-devel
3、安装zlib yum install -y zlib zlib-devel
4、安装Open SSL yum install -y openssl openssl-devel
5、进入local文件夹 cd /usr/local
6、mkdir nginx
7、下载nginx wget http://nginx.org/download/nginx-1.17.9.tar.gz
8、解压nginx tar -zxvf nginx-1.17.9.tar.gz
9、cd nginx-1.17.9
10、./configure
11、make
12、make install
来源:oschina
链接:https://my.oschina.net/u/3358860/blog/3218037