我执行systemctl status redis后显示的是
● redis.service - Redis
Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: failed (Result: timeout) since 四 2020-09-03 05:07:33 CST; 14min ago
Process: 13258 ExecStart=/usr/local/redis-4.0.14/src/redis-server /usr/local/redis-4.0.14/redis.conf (code=exited, status=0/SUCCESS)
9月 03 05:07:33 imooc systemd[1]: redis.service start operation timed out. Terminating.
9月 03 05:07:33 imooc redis-server[13258]: 13258:signal-handler (1599080853) Received SIGTERM scheduling shutdown...
9月 03 05:07:33 imooc redis-server[13258]: 13258:M 03 Sep 05:07:33.531 # User requested shutdown...
9月 03 05:07:33 imooc redis-server[13258]: 13258:M 03 Sep 05:07:33.531 * Saving the final RDB snapshot before exiting.
9月 03 05:07:33 imooc redis-server[13258]: 13258:M 03 Sep 05:07:33.534 * DB saved on disk
9月 03 05:07:33 imooc redis-server[13258]: 13258:M 03 Sep 05:07:33.534 * Removing the pid file.
9月 03 05:07:33 imooc redis-server[13258]: 13258:M 03 Sep 05:07:33.534 # Redis is now ready to exit, bye bye...
9月 03 05:07:33 imooc systemd[1]: Failed to start Redis.
9月 03 05:07:33 imooc systemd[1]: Unit redis.service entered failed state.
9月 03 05:07:33 imooc systemd[1]: redis.service failed.
2020-09-03 15:38:16
[Unit]
Description=Redis
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/redis_6379.pid
ExecStart=/usr/local/redis-4.0.14/src/redis-server /usr/local/redis-4.0.14/redis.conf
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
这是我的redis.service文件
2020-09-03 15:43:23
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星