1、安装基础依赖环境
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++
2、安装PCRE
cd /usr/local/src/
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
tar -zxvf pcre-8.39.tar.gz
cd pcre-8.39/
./configure
make & make install
3、安装zlib
cd /usr/local/src
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install
4、安装nginx
cd /usr/local/src
下载nginx-1.16.0.tar.gz
tar -zxvf nginx-1.1.10.tar.gz
cd nginx-1.1.10
./configure
make
make install
5、测试nginx
(1)启动
/usr/local/nginx/sbin/nginx
(2)重启
/usr/local/nginx/sbin/nginx -s reload
(3)停止
kill -9 nginx进程号