saber酱的抱枕

Fly me to the moon

06/24
15:55
软件

Debian 安装配置 Redis 数据库

apt update
apt install redis-server

安装完成后,Redis服务将会自动启动,你可以通过以下命令校验Redis服务是否正常运行:

systemctl status redis-server

接下来编辑配置文件:

vim /etc/redis/redis.conf

设置密码:

# requirepass foobared
# 取消掉注释,改为
requirepass 你的密码

如果要允许远程主机访问,则修改:

bind 127.0.0.1 修改为 0.0.0.0
protected-mode yes 修改为no

修改完配置文件之后,需要重启 redis 服务

systemctl restart redis.service

Debian 安装配置 Redis 数据库

评论 saber 撤销评论