sep.cc 如涉及侵权内容,请联系 cyclists@outlook.com

LNMP1.5 安装 ngx_cache_purge 缓存清除组件

LNMP安装ngx_cache_purge缓存清除组件步骤如下:

一、检查是否已安装 ngx_cache_purge

nginx -V 2>&1 | grep -o ngx_cache_purg

如果显示 ngx_cache_purge 则已安装。

二、编译安装 ngx_cache_purge 步骤

1、进入LNMP的源码目录

cd /root/lnmp1.5/src

2、下载最新版 ngx_cache_purge

wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz

3、解压 NGINX 和 ngx_cache_purge

tar xzf nginx-1.14.0.tar.gz
tar xzf ngx_cache_purge-2.3.tar.gz

4、进入 nginx 目录

cd nginx-1.14.0

5、查看现有 nginx 配置参数

nginx -V

6、在现有的编译参数后面加上–add-module=/root/lnmp1.5/src/ngx_cache_purge-2.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.5/src/openssl-1.0.2o --add-module=/root/lnmp1.5/src/ngx_cache_purge-2.3

如您的编译参数不同,请自行对照修改。

7、开始编译

make

8、备份原来的 Nginx 编译文件

mv /usr/local/nginx/sbin/nginx{,_`date +%F`}

9、拷贝新的编译文件过去

cp objs/nginx /usr/local/nginx/sbin/nginx

10、检查配置

/usr/local/nginx/sbin/nginx -t

11、完成升级

make upgrade

12、检查是否安装成功

nginx -V 2>&1 | grep -o ngx_cache_purge

出现 ngx_cache_purge ,表示已经成功在 LNMP1.5 环境下添加了 ngx_cache_purge 组件。

最后编辑:2019年3月08日 23:46:00「本站部分内容具有时效性,如遇失效请留言反馈」

转载声明:本站所有内容采用 CC BY-NC-SA 国际许可协议,转载请注明来源:Sep blog,谢谢!

版权声明:如文章内容涉及侵权,请联系 cyclists@outlook.com,待查证属实之后会立刻删除侵权内容。

评论 (4)
  1. avatar
    沙发
    奶爸de笔记 2019-05-07 23:50

    你的Google统计国内使用正常么?我用站长工具ping有些地区还是打不开。

  2. avatar
    板凳
    奶爸de笔记 2019-05-07 23:49

    装了这个的,为了测试缓存速度,后面还是用的super cache