./configure: error: the HTTP rewrite module requires the PCRE library.

1.安装 gcc,

    yum install gcc‐c++

2.nginx的http模块使用pcre来解析正则表达式,需要在linux上安装pcre库

    yum install ‐y pcre pcre‐devel

3.安装zlib库,nginx使用zlib对http包的内容进行gzip

    yum install ‐y zlib zlib‐devel

4.安装openssl库,让 nginx 支持 https(即在ssl协议上传输http)

    yum install ‐y openssl openssl‐devel

5.下载压缩包 (选好安装目录:/etc/nginx)

    wget https://nginx.org/download/nginx‐1.20.1.tar.gz
  1. 解压缩包

     tar ‐zxvf nginx‐1.20.1.tar.gz
    
  2. 进入解压后的目录 cd nginx‐1.20.1

  3. 执行 ./configure & make & make install 编译

错误为:./configure: error: the HTTP rewrite module requires the PCRE library.

解决方案:安装 pcre-devel
yum -y install pcre-devel

你可能感兴趣的:(http,网络协议,网络)