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

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native