author:headsen  chen

date:2017-12-07 16:33:40

notice:This article is created by  headsen chen ,and not allowed to copy,or you will counter  law  question.

install:

yum -y install epel-release

yum -y install redis

modify redis's control file:

vim  /etc/redis.conf

bind 192.168.1.10     # just listen the real ip of localhost.

daemonize yes    #  redis  can work in daemon states,and when machine is open and redis  service is running.

start:

systemctl enable redis

systemctl start redis

manage:

[root@node1 tmp]# redis-cli -h 192.168.1.10

192.168.13.164:6379[6]> info     # to show more detail of redis

...

# Keyspace
db6:keys=2,expires=0,avg_ttl=0          # db6 means  database is 6  and keys=2 means in 6 has two keys

192.168.13.164:6379[6]> keys *     # keys  *     show keys name
1) "nginx-log"
2) "system"

192.168.13.164:6379[6]> llen system    # see system key information,means that has 121962 values in this key not read ,and when readed for all ,will change to 0
(integer) 121962

192.168.13.164:6379[6]> LINDEX system -1   # to see the latest message of system key
"{\"message\":\"Dec 7 16:37:50 node1 elasticsearch: [2017-12-07 16:37:50,074][WARN ][monitor.jvm ] [node-1] [gc][young][80898][1132] duration [2.8s], collections [1]/[2.9s], total [2.8s]/[1.5m], memory [135.7mb]->[119.2mb]/[1015.6mb], all_pools {[young] [40.1mb]->[21.8mb]/[66.5mb]}{[survivor] [6.9mb]->[8.3mb]/[8.3mb]}{[old] [88.6mb]->[89.1mb]/[940.8mb]}\",\"@version\":\"1\",\"@timestamp\":\"2017-12-07T08:37:52.085Z\",\"path\":\"/var/log/messages\",\"host\":\"node1.com\",\"type\":\"system\"}"

192.168.13.164:6379[6]> quit     # exit of redis  managerment 
[root@node1 tmp]#

redis's usage的更多相关文章

  1. Redis: Reducing Memory Usage

    High Level Tips for Redis Most of Stream-Framework's users start out with Redis and eventually move ...

  2. 161128、Redis 4.0发布及其新功能介绍

    Redis 4.0-rc1 发布了,这是 4.0 的首个 RC 版.Redis 是一个高性能的key-value数据库.Redis 的出现,很大程度补偿了memcached这类keyvalue存储的不 ...

  3. Redis 4.0新功能介绍

    Redis 的作者 antirez 在三天之前通过博客文章<The first release candidate of Redis 4.0 is out>发布了 Redis 4.0 的第 ...

  4. redis的数据持久化策略

    redis提供了两种不同的持久化方法来将数据存储到硬盘里面.一种方法叫快照,它可以将存在于某一时刻的所有数据都写入硬盘里面.另一种方法叫只追加文件(AOF),它会在执行写命令时,将被执行的写命令复制到 ...

  5. Lazy freeing of keys 对数据的额异步 同步操作 Redis 4.0 微信小程序

    https://github.com/antirez/redis/blob/4.0-rc1/00-RELEASENOTES 数据缓存 · 小程序 https://developers.weixin.q ...

  6. (十二)zabbix监控redis

    1)agent端配置 安装redis yum install epel-release -y yum install redis -y 配置认证密码 #vim /etc/redis.conf requ ...

  7. 【特性】Redis4.0新特性

    模块系统 Redis 4.0 发生的最大变化就是加入了模块系统, 这个系统可以让用户通过自己编写的代码来扩展和实现 Redis 本身并不具备的功能, 具体使用方法可以参考 antirez 的博文< ...

  8. Redis4.0新特性(一)-Memory Command

    Redis4.0版本增加了很多诱人的新特性,在redis精细化运营管理中都非常有用(猜想和antirez加入redislabs有很大关系):此系列几篇水文主要介绍以下几个新特性的使用和效果. Redi ...

  9. Redis client Python usage

    http://www.yiibai.com/redis/redis_sorted_sets.html mport redis r_server = redis.Redis('localhost') # ...

随机推荐

  1. nyoj28 大数阶乘 亿进制优化

    思路:刚开始用的十进制模拟手算加法,超时了.然后想到刘汝佳大哥书上面用的亿进制能够加速大数运算,果然180ms过掉了. 亿进制与十进制相同,只不过是把八位看做一位,例如6464654654165,看成 ...

  2. requests+多进程poll+pymongo实现抓取小说

    今天看着有个很吸引人的小说作品信息:一家只在深夜开门营业的书屋,欢迎您的光临.作为东野奎吾<深夜食堂>漫画的fans,看到这个标题按捺不住我的好奇心........ 所以我又抓下来了,总共 ...

  3. linux yum源配置及vim运用

    redhat7默认没有yum模板,需要自己创建[root@localhost ~]# mount /dev/cdrom /root/iso/(挂载镜像)mount: /dev/sr0 写保护,将以只读 ...

  4. java I/O框架 (四)文件流

    文件读取 FileInputStream FileReader 文件写入 FileOutputStream FileWriter 随机文件读写 RandomAccessFile 一.文件读取 File ...

  5. ip2long的用法

    ip2long:将IPv4的ip地址(以小数点分隔形式)转换为int Description int ip2long ( string ip_address ) 如果ip地址非法,返回FALSE(PH ...

  6. JXL组件生成报表报错(二)

    JXL组件生成报表 1.具体报错如下: usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonam ...

  7. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'smvch'

    1.错误描述 INFO:2015-05-01 14:20:44[main] - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDat ...

  8. java.lang.ArrayIndexOutOfBoundsException

    1.错误描述 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at com.you.m ...

  9. 复制粘贴之不带插件的jquery

    一.实现点击按钮,复制文本框中的的内容 <script type="text/javascript"> function copyUrl2() { var Url2=d ...

  10. Aspose.Words for .NET

    Aspose.Words for .NET Aspose.Words for .NET是 .NET 下先进的 Word 文档处理 API.它支持 DOC, OOXML, RTF, HTML, Open ...