ubuntu安装redis

1、下载安装
root@21ebdf03a086:/# apt-cache search redis
root@21ebdf03a086:/# apt-get install redis-server

a、redis配置文件:/etc/redis/redis.conf
b、redis服务路径:/etc/init.d/redis-server

2、启动redis
root@21ebdf03a086:/# cd /etc/init.d
root@21ebdf03a086:/# redis-server &
注:要先进入"/etc/init.d"目录,再执行"redis-server &"命令启动redis

3、启动client客户端连接
root@21ebdf03a086:/# redis-cli
127.0.0.1:6379> set name ljq
OK
127.0.0.1:6379> get name
"ljq"
127.0.0.1:6379>

posted on 2014-06-24 11:35  Ruthless  阅读(6481)  评论(0编辑  收藏  举报