参考下面文章进行安装:
按照上面博客进行redis安装大体没啥问题,在生成供systemd使用的service文件的时候出现如下报错。
Job for redis.service failed because the control process exited with error code. See “systemctl stat
需要把Type和PIDFile注释就好了
[Unit]
Description=Redis
After=network.target
[Service]
#Type=forking
#PIDFile=/var/run/redis_6379.pid
ExecStart=/home/work/redis/redis-6.0.3/bin/redis-server /home/work/redis/redis-6.0.3/conf/redis.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target