我们有一些WEB环境是自带默认安装过ngx_cache_purge缓存组件的,如果没有安装过我们需要手工编译安装。比如我们如果有在使用LNMP一键包Nginx引擎WEB环境的,我们如果没有安装则需要自己再安装一下。在这篇文章中,小编记录通过LNMP军哥脚本然后去安装ngx_cache_purge缓存组件。
1、检查是否安装
nginx -V 2>&1 | grep -o ngx_cache_purg
2、进入编译目录安装
cd /root/lnmp1.8/src
wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz
3、修改参数
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-stream_ssl_module --with-openssl=/root/lnmp1.8/src/openssl-1.0.2o --add-module=/root/lnmp1.5/src/ngx_cache_purge-2.3
make
5、检查Nginx
/usr/local/nginx/sbin/nginx -t
6、升级完成
make upgrade
nginx -V 2>&1 | grep -o ngx_cache_purge