源码安装nginx
2019-3-15 dingshangchao
1.sudo yum install gcc gcc-c++
2.sudo yum install wget
3.sudo wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
sudo tar -zxvf pcre-8.38.tar.gz
4.sudo wget http://zlib.net/zlib-1.2.11.tar.gz
sudo tar -zxvf zlib-1.2.11.tar.gz
5.sudo wget http://nginx.org/download/nginx-1.14.2.tar.gz
sudo tar -zxvf nginx-1.14.2.tar.gz
6.cd nginx-1.14.2
sudo ./configure --prefix=/lnmp/nginx --with-pcre=/pcre-8.38 --with-zlib=/zlib-1.2.11
7.sudo make
sudo make install
8.firewall-cmd --add-port=80/tcp
9.访问