Redis配置指南

1. 安装

$ wget http://download.redis.io/releases/redis-5.0.8.tar.gz
$ tar xzf redis-5.0.8.tar.gz
$ cd redis-5.0.8
$ make

2.配置

  1. 注释掉bind 127.0.0.1
  2. protected-mode yes
  3. requirepass xxxpassword
  4. daemonize yes

3. 启动

cd src
./redis-server

或者

cd src
./redis-server ../redis.conf

4. 停止

cd src
./redis-cli
auth xxxpassword
shutdown
exit

5. 卸载

find / -name "redis*" | xargs rm -rf

6.远程连接

window连接远程redis:

redis-cli -h 193.112.37.xxx -p 6379 -a xxxpassword

版权

评论