Centos7.2 OpenResty安装

前端之家收集整理的这篇文章主要介绍了Centos7.2 OpenResty安装前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

产考博文

安装顺序

1,创建安装目录

mkdir -p /usr/servers  
cd /usr/servers/

2,安装依赖

yum install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl  readline-devel pcre-devel openssl-devel gcc

3,下载最新版的ngx_openresty

wget https://openresty.org/download/openresty-1.11.2.3.tar.gz
tar -xzvf openresty-1.11.2.3.tar.gz

4,安装LuaJIT

cd openresty-1.11.2.3/bundle/LuaJIT-2.1-20170405
make clean && make && make install
ln -sf LuaJIT-2.1-20170405 /usr/local/bin/luajit

5 下载ngx_cache_purge模块

该模块用于清理Nginx缓存

cd /usr/servers/openresty-1.11.2.3/bundle  
wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.tar.gz  
tar -xvf 2.3.tar.gz

6 下载Nginx_upstream_check_module模块

该模块用于ustream健康检查

cd /usr/servers/openresty-1.11.2.3/bundle  
wget https://github.com/yaoweibin/Nginx_upstream_check_module/archive/v0.3.0.tar.gz  
tar -xvf v0.3.0.tar.gz

7 安装 OpenResty

cd /usr/servers/openresty-1.11.2.3  
./configure --prefix=/usr/servers --with-http_realip_module  --with-pcre  --with-luajit --add-module=./bundle/ngx_cache_purge-2.3/ --add-module=./bundle/Nginx_upstream_check_module-0.3.0/ -j2 
make && make install

其他

  1. 核心和第三方模块目录 openresty-1.11.2.3/bundle
原文链接:https://www.f2er.com/centos/376983.html

猜你在找的CentOS相关文章