用一个终端打开redis服务后 另一个安装课程步骤设置 执行systemctl start redis报错
来源:4-5 Linux用户与用户组管理
_谁会观星
2021-01-08 12:41:18
[root@imooc ~]# find / -name *.pid
/run/redis_6379.pid
/run/dhclient-ens33.pid
/run/libvirtd.pid
/run/syslogd.pid
/run/gdm/gdm.pid
/run/atd.pid
/run/crond.pid
/run/sm-notify.pid
/run/sshd.pid
/run/ksmtune.pid
/run/gssproxy.pid
/run/abrt/abrtd.pid
/run/chrony/chronyd.pid
/run/alsactl.pid
/run/libvirt/network/default.pid
/run/auditd.pid
/run/tuned/tuned.pid
/run/lvmetad.pid
/var/spool/postfix/pid/master.pid
[root@imooc ~]# cd /usr/lib/systemd/system
[root@imooc system]# vim redis.service
[root@imooc system]# systemctl daemon-reload
[root@imooc system]# systemctl start redis
Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details.
[root@imooc system]# systemctl restart redis
Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details.
[root@imooc system]# systemctl restart redis
Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details.
[root@imooc system]# systemctl start redis
Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details.
[root@imooc system]#
1回答
好帮手慕小尤
2021-01-08
同学你好,1. 建议同学查看Redis.service文件,查看内容是否正确。
2. 建议同学查看redis服务器进程
ps -ef|grep redis
然后杀死redis服务器,并指定加载的配置文件把redis的所有显示的都杀掉
sudo kill -9 pid
sudo redis-server /etc/redis/redis.conf
最后重启redis试一下。
3. 如果还存在问题,则建议同学根据错误信息提示,输入"systemctl status redis.service" 和 "journalctl -xe" for details命令查看具体错误信息,然后根据错误信息排查错误。
祝学习愉快!
相似问题