Skip to content

Redis

安装

  1. 检测 apt 更新
sudo apt update
  1. 安装 redis
sudo apt install redis-server -y
  1. 进入redis-cli
redis-cli
  1. 输入命令返回 PONG 表示安装成功
ping

配置

  1. 配置文件路径:/etc/redis/redis.conf
  2. 使用进程管理系统
supervised systemd
  1. 设置密码
requirepass 密码

服务管理

  1. 重启
sudo systemctl restart redis-server
  1. 开机自启动
sudo systemctl enable redis-server
  1. 状态
sudo systemctl status redis-server