(1)复制/usr/local/tmp/redis-5.0.5/中redis.conf配置文件
# cd /usr/local/tmp/redis-5.0.5/
# cp redis.conf /usr/local/redis/bin/
(2)修改配置文件
# cd /usr/local/redis/bin/
# vim redis.conf
把daemonize的值由no修改为yes
修改效果如下:
在redis5中需要修改配置文件redis.conf允许外部访问,需要修改两处。
注释掉下面
bind 127.0.0.1
修改效果如下:
protected-mode yes 改成 no
(3)启动redis
# ./redis-server redis.conf
(4)重启redis
# ./redis-cli shutdown
# ./redis-server redis.conf
(5)启动客户端工具
在redis5中客户端工具对命令会有提供功能
#./redis-cli