linux中systemctl status redis后显示redis-server.service not found的原因和解决方案
原因:没有注册redis服务解决方案:先安装:apt install sysv-rc-conf(注:若显示unable to locate package sysv-rc-conf需:vi /etc/apt/source.list输入i,进入Insert模式在最后加入deb http://archive.ubuntu.com/ubuntu/ trusty main universe restric
·
原因:没有注册redis服务(在注册了redis服务后,才能用service redis start、service redis stop、service redis restart的方式进行启动、停止、重启,否则只能用默认方式启动等)
解决方案:
先安装:
apt install sysv-rc-conf
(注:
若显示unable to locate package sysv-rc-conf需:
vi /etc/apt/source.list
输入i,进入Insert模式
在最后加入
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
Esc,:wq保存并退出
sudo apt update
再安装
sudo apt install sysv-rc-conf)
再注册redis服务
sysv-rc-conf redis on
此时再查看redis-server的状态:进入redis-server所在目录下执行:
systemctl status redis-server
更多推荐
已为社区贡献3条内容
所有评论(0)