centos7 编译安装 openresty

下载

  wget https://openresty.org/download/openresty-1.15.8.1.tar.gz

解压

  tar -xzvf openresty-1.15.8.1

安装前准备

  yum install pcre-devel openssl-devel gcc curl

编译

  cd openresty-1.15.8.1
./configure –prefix=/usr/local/openresty-1.15.8.1 –with-http_auth_request_module
make
make install

查看版本

  /usr/local/openresty-1.15.8.1/nginx/sbin/nginx -V

删除重装

  rm -rf /usr/local/openresty-1.15.8.1/

  cd /opt/openresty-1.15.8.1

  make clean