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.配置
- 注释掉bind 127.0.0.1
- protected-mode yes
- requirepass xxxpassword
- 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
评论