redis的web端监控工具Webdis安装使用

应用场景

当安装完redis后,通过shell端或者客户端对redis进行操作,但是缺少了对redis的监控工具,下面介绍redis的web端的监控工具Webdis。

操作步骤

1. 安装软件包

安装依赖
 # cd /root
 # yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel curl
 # yum -y install libevent-devel
 # yum -y install git

下载编译源码
 # git clone git://github.com/nicolasff/webdis.git
 # cd webdis
 # make

创建安装目录并拷贝安装与配置文件
 # mkdir /usr/local/webdis
 # cp webdis /usr/local/webdis
 # cp webdis.json /usr/local/webdis

2. 修改配置文件

编辑修改webdis配置文件webdis.json以下参数:
 # vim /usr/local/webdis/webdis.json
{
"redis_host": "127.0.0.1",
"redis_port": 6379,
"redis_auth": null,

"http_host": "0.0.0.0",
"http_port": 7379,

"threads": 5,
"pool_size": 20,

"daemonize": true,
"websockets": false,

"database": 0,

"acl": [
{
"disabled": ["DEBUG", "FLUSHDB", "FLUSHALL"]
},

{
"http_basic_auth": "user:password",
"enabled": ["DEBUG"]
}
],

"verbosity": 6,
"logfile": "/usr/local/webdis/webdis.log",
"pidfile": "/usr/local/webdis/webdis.pid"
}

3. 配置自启动

增加自启动命令,需配置在redis启动命令下面
 # vim /etc/rc.local
/usr/local/webdis/webdis /usr/local/webdis/webdis.json

重启服务器
 # reboot

4. 安装验证

测试常用API,或者在浏览器打开对应地址测试:
 # curl http://127.0.0.1:7379/SET/key/value
 # curl http://127.0.0.1:7379/GET/key
 # curl http://127.0.0.1:7379/DEL/key
 # curl http://127.0.0.1:7379/keys/*
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值