第1步
wget https://openresty.org/download/openresty-1.17.8.1.tar.gz
第2步
tar -xzvf openresty-1.17.8.1.tar.gz
第3步
yum -y install pcre-devel
第4步
yum -y install openssl openssl-devel
第5步
yum -y install lua*
第6步
cd bundle/LuaJIT-2.1-20200102/
第7步
make clean && make && make install
第8步
ln -sf luajit-2.1.0-beta3 /usr/local/bin/luajit
第9步
cd bundle
第10步
下载ngx_cache_purge模块,该模块用于清理nginx缓存
wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.tar.gz
第11步
tar -xvf 2.3.tar.gz
第12步
下载nginx_upstream_check_module模块,该模块用于ustream健康检查
wget https://github.com/yaoweibin/nginx_upstream_check_module/archive/v0.3.0.tar.gz
第13步
tar -xvf v0.3.0.tar.gz
第14步
cd ..
第15步
./configure --prefix=/usr/test/openresty --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
- --with*** 安装一些内置/集成的模块
- --with-http_realip_module 取用户真实ip模块
- -with-pcre Perl兼容的达式模块
- --with-luajit 集成luajit模块
- --add-module 添加自定义的第三方模块,如此次的ngx_che_purge
第16步
make && make install
第17步,启动
/usr/test/openresty/nginx/sbin/nginx