#下载安装包
cd /opt
wget http://nginx.org/download/nginx-1.14.2.tar.gz -c
#安装依赖
yum -y install pcre-devel gcc gcc-c++ autoconf automake make zlib-devel
#编译
./configure --prefix=/usr/local/nginx-1.14.2
......
......
make
make install
#做个软链
ln -s /usr/local/nginx-1.14.2/sbin/nginx /usr/sbin/
#启动nginx
nginx
网友评论