博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
redis's usage
阅读量:5975 次
发布时间:2019-06-20

本文共 1657 字,大约阅读时间需要 5 分钟。

authorheadsen  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]#

 

转载于:https://www.cnblogs.com/kaishirenshi/p/7999911.html

你可能感兴趣的文章
Android:Plug-in com.android.ide.eclipse.adt was unable to load class android
查看>>
一分钟了解阿里云产品:对象存储OSS概述
查看>>
mvvm
查看>>
WWDC 2018:iOS 12 通知的新特性
查看>>
SharePreference源码学习和多进程的场景
查看>>
Android-ffmpeg编译so文件
查看>>
自2018年以来我不知道的事情-Dan Abramov
查看>>
React Ways1——函数即组件
查看>>
安卓判断前后台
查看>>
go设计模式之代理模式
查看>>
抓取猫眼电影top100的正则、bs4、pyquery、xpath实现方法
查看>>
git 命令
查看>>
介绍一款facebook信息收集工具FBI
查看>>
五分钟创建一个自己的NPM包
查看>>
我的友情链接
查看>>
Spring Cloud Netflix—如何加入Hystrix
查看>>
万物根源-一分钟教你发布npm包
查看>>
SkyWalking之高级玩法
查看>>
iOS多线程编程:线程同步总结 NSCondtion
查看>>
Flutter开发环境安装
查看>>