redis 3.2.6 on ubuntu 14.04

1. official site: https://github.com/antirez/redis/releases

 

2. compile and setup

tar zxf redis-3.2.6.tar.gz

cd redis-3.2.6/deps

export ARCH=

make geohash-int
make hiredis
make jemalloc
ls
make linenoise
make lua

cd ..

make

make install

sudo ./utils/install_server.sh    (参数全部默认)

 

3.维护指令

service redis_6379 status
service redis_6379 stop
service redis_6379 start
redis-cli
redis的配置文件/etc/redis/6379.conf
grep -E -v "^#" /etc/redis/6379.conf |sed '/^$/d'

 

4.配置

/etc/redis/6379.conf

由于redis采用的安全策略,默认会只准许本地访问,修改上面配置文件,

把bind 127.0.0.1注释掉,再把protected-mode 改为no,设置密码requirepass,

可以用windows客户端维护查看:下载RedisDesktopManager(https://redisdesktop.com/)

设置密码后,redis-cli连接,然后输入auth password1

 

5.常用指令

 

6.参考:

http://blog.csdn.net/cuibruce/article/details/53501532

http://www.cnblogs.com/kmonkeywyl/p/5728062.html

 

posted on 2016-12-20 12:53  拥剑公子  阅读(285)  评论(0编辑  收藏  举报

导航