您的位置:首页 > 数据库 > Redis

redis 3.2.6 on ubuntu 14.04

2017-12-21 19:27 387 查看
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
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: