openresty安裝

cd /usr/local/
mkdir data
cd data
wget http://openresty.org/download/openresty-1.9.15.1.tar.gz

cd /usr/local/data/ cd openresty-1.9.15.1/bundle/LuaJIT-2.1-20160517/ make clean make clean && make && make install cd /usr/local/data/openresty-1.9.15.1/bundle/ wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.tar.gz tar -zxvf 2.3 wget http://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.tar.gz tar -zxvf 2.3.1 wget https://github.com/yaoweibin/nginx_upstream_check_module/archive/v0.3.0.tar.gz tar -zxvf v0.3.0 ./configure --prefix=/usr/local/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 make & make install cd /usr/local/openrestry/
./sbin/nginx

配置參數:nginx

--with***                安裝一些內置/集成的模塊git

--with-http_realip_module  取用戶真實ip模塊github

-with-pcre                Perl兼容的達式模塊緩存

--with-luajit              集成luajit模塊lua

 

--add-module           添加自定義的第三方模塊,如這次的ngx_che_purgespa

--prefix       指定安裝路徑rest

安裝模塊說明:code

openresty-1.9.15.1/bundle目錄裏存放着nginx核心和不少第三方模塊,好比有咱們須要的Lua和LuaJIT。blog

安裝LuaJITip

下載ngx_cache_purge模塊,該模塊用於清理nginx緩存

下載nginx_upstream_check_module模塊,該模塊用於ustream健康檢查

相關文章
相關標籤/搜索