Ubuntu 20.04.4 LTS


# 更新 apt
apt update
# 清理历史安装(没有不需要处理)
apt-get purge --auto-remove redis-server
# 安装
apt install redis-server
# 启动
systemctl restart redis-server
# 出现:System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down 使用 service 启动
# systemctl出现问题,可以用service启动
service redis-server start
# 测试
redis-cli

其他

# 查看service 所有服务
service --status-all