1、安装nginx需要的依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
2、下载 nginx
wget http://nginx.org/download/nginx-1.14.2.tar.gz
3、解压并安装
tar -xvf nginx-1.14.2.tar.gz
cd nginx-1.14.2
./configure
make && make install
这样默认安装在 /usr/local/nginx