1) 下载: http://redis.io/ OR http://www.redis.cn/download.html
最新稳定版: 2.4.9
2) 安装:
#tar zxvf redis-2.4.9.tar.gz
#cd redis-2.4.9
#make
3) 修改配置
#vi /etc/redis.conf
取消注释 requirepass foobared
4) 启动Redis
#redis-server src/redis.conf
关闭Redis
#src/redis-cli shutdown
5)常用命令
查看进程 #ps -ef | grep redis
进入命令界面
cmd telnet 127.0.0.1 6379 OR #scc/redis-cli
redis>set a b (error) ERR operation not permitted (-a 设置这个时候没起作用 )
授权 redis>auth foobared
Set值 #redis>set a b
Get值 #redis>get a
存在 #redis>exists a
退出 #redis>quit
Redis 常用命令参考:http://redis.readthedocs.org/en/latest/