Redis设置成服务及开机自动启动
[root@Centos7A ~]# vim /usr/lib/systemd/system/redis.service
[Unit]
Description=redis-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
PrivateTmp=true
[Install]
WantedBy=multi-user.target
systemctl start redis.service 启动服务
systemctl restart redis.service 重启服务
systemctl enable redis.service 设置成开机启动
🐞标题:Centos7下redis配置开机自动启动
👽作者:ruige
🐾地址:https://jjdhhc.com/articles/2020/12/16/1608085714363.html
🙏感恩:谢谢您的打赏与支持!中间图片是我的微信公众号,扫码关注哦!