一、装置编译工具及库文件

yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel

二、下载nginx文件

wget http://nginx.org/download/nginx-1.20.2.tar.gz

三、装置pcre

pcre能够让nginx反对rewrite
从官网下载pcre: https://sourceforge.net/proje...
编译装置:

./configure --prefix=/usr/local/pcremake && make install

查看pcre的版本:

pcre-config --version

四、装置nginx

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/home/app/pcre-8.35

-- 留神:--with-pcre参数寄存的是pcre的解压后的源码地位,不是编译装置后的程序地位
启动nginx

cd /usr/local/nginx/sbin./nginx

拜访页面:

默认的配置文件凋谢的是80端口