Replies: 3 comments
-
Getting started通过CLI探索Redis
Redis安全加固
在程序中使用Redis使用Redis的真正目的是为了在程序中使用,而不仅仅是在命令行CLI中。可以在不同语言客户端列表找到程序语言对应的Redis客户端 Redis持久化
正确的安装Redis
|
Beta Was this translation helpful? Give feedback.
-
Manual/CLIRedis命令行接口(Redis -cli)是一个终端程序,用于向Redis服务器发送命令,并读取服务器的回复。 redis-cli 有两种模式:
命令行参数模式
字符串引号和转义
主机/端口/密码/数据库
SSL/TLS
从其他程序获取输入
持续运行相同命令这在不同的环境中都是有用的,例如:当我们想要持续监视一些关键内容或INFO字段输出时,或者当我们想要模拟一些重复出现的写入事件时,例如每5秒将一个新条目推入列表中。
$ redis-cli -r 5 INCR counter_value
(integer) 1
(integer) 2
(integer) 3
(integer) 4
(integer) 5 CSV输出
$ redis-cli LPUSH mylist a b c d
(integer) 4
$ redis-cli --csv LRANGE mylist 0 -1
"d","c","b","a" 运行Lua脚本$ cat /tmp/script.lua
return redis.call('SET',KEYS[1],ARGV[1])
$ redis-cli --eval /tmp/script.lua location:hastings:temp , 23
OK
连接和重连
127.0.0.1:6379> CONNECT metal 6379
metal:6379> PING
PONG
127.0.0.1:6379> CONNECT 127.0.0.1 9999
Could not connect to Redis at 127.0.0.1:9999: Connection refused
not connected> PING
Could not connect to Redis at 127.0.0.1:9999: Connection refused
not connected> PING
Could not connect to Redis at 127.0.0.1:9999: Connection refused
编辑,历史,补全和提示
首选项
Redis命令帮助信息使用
特殊操作模式
|
Beta Was this translation helpful? Give feedback.
-
Data types教程
|
Beta Was this translation helpful? Give feedback.
-
Redis
The open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker.
Beta Was this translation helpful? Give feedback.
All reactions