如何實現systemd監管 Redis?

1)、
# cd /etc/systemd/system
2)、
# cat redis36379.service 

[Unit]
Description=Redis persistent key-value database
After=network.target

[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis36379.conf --daemonize no
ExecStop=/usr/local/bin/redis-cli -p 36379 shutdown
Restart=always

[Install]
WantedBy=multi-user.target
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章