redis-cli set mykey somevalue
./redis-cli get mykey
8、封闭办事
$ redis-cli shutdown
#封闭指定端口的redis-server
$redis-cli -p 6380 shutdown
9、客户端也能够利用telnet模式毗连。
[root@dbcache conf]# telnet 127.0.0.1 6379
Trying 127.0.0.1...
Connected to dbcache (127.0.0.1).
Escape character is "^]".
set foo 3
bar
+OK
get foo
$3
bar
^]
telnet> quit
Connection closed.