文章内容
2020/6/6 14:16:47,作 者: 黄兵
Ubuntu Redis 配置
最近需要一个测试环境,在Linux上安装Redis,具体安装步骤可以参考这里:redis download,或者是这篇文章:Ubuntu 20.04 安装 Redis
安装完成之后,开始编辑/etc/redis/redis.conf
文件。
之后查找:requirepass,这里是设置密码的地方。
同时需要看到上面警告:
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
---------------------------------------------------------------------------------------------------------
#警告:由于Redis相当快,外部用户可以尝试
#一个好的测试环境每秒可输入150k密码。 这意味着你应该
#使用非常强的密码,否则将很容易被破解。
删除注释之后,设置一个强壮的密码。
还需要设置IP绑定,具体设置如下:
bind 0.0.0.0
保存之后,重启Redis,使用如下命令:
systemctl restart redis.service
查看运行状态:
systemctl status redis.service
评论列表