redis-cli读取与写入
bjlthy@bjlthy-X99:~$
bjlthy@bjlthy-X99:~$ redis-cli -h 192.168.19.135 -p 6379
192.168.19.135:6379> get 192.168.19.70@info
"{\"connect\":true,\"count\":0}"
192.168.19.135:6379> set 192.168.19.70@info "{\"connect\":true,\"count\":10}"
OK
192.168.19.135:6379> get 192.168.19.70@info
"{\"connect\":true,\"count\":5}"
192.168.19.135:6379> get 192.168.19.70@info
"{\"connect\":true,\"count\":3}"
192.168.19.135:6379> get 192.168.19.70@info
"{\"connect\":true,\"count\":1}"
192.168.19.135:6379> get 192.168.19.70@info
"{\"connect\":true,\"count\":0}"
192.168.19.135:6379> get 192.168.19.70@info
"{\"connect\":true,\"count\":0}"
参考博客
1、ubuntu下关闭Redis守护/etc/init.d/redis-server stop