101上重新连接103并获取user.1.name的值
[root@linuxidc001 ~]# Redis-cli -h 192.168.1.103 -p 6379
redis 192.168.1.103:6379> get user.1.name
(error) ERR operation not permitted
redis 192.168.1.103:6379>
为什么是error呢,当然是因为连接103时没传递密码了,退出重新连
redis 192.168.1.103:6379> quit
[root@linuxidc001 ~]# redis-cli -h 192.168.1.103 -p 6379 -a "hi, coder"
redis 192.168.1.103:6379> get user.1.name
"zhangsan"
看到zhangsan,说明你已经连接成功了。关于get、set 用法,在下个blog中讲,没有耐心的观众可以直接看这里:http://redis.io/commands#string
redis的安装信息,请参阅上篇:Redis系列-安装部署维护篇 http://www.linuxidc.com/Linux/2012-12/75627.htm
