string是最简单的类型,一个key对应一个value,string类型是二进制安全的.redis的string可以包含任何数据,比如JPG图片或者序列化的对象 操作 set 设置key对应的值为string类型的value 例如: set name haoxing //设置key为那么value为haoxiang get name //会得到“haoxiang” 注意: set 重复添加相同的key名会覆盖原来的值 setnx
安装 Redis 后,默认配置下启动会得到如下日志: [] Sep ::! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect
redis 安装文件: http://blog.csdn.net/tangsilai/article/details/7477961 ============================== String ======================================= 一. 字符串: name , age 均为key 设置值: set name boa >> ok 获取值: get name >>