redis 单元控制文件

[Unit]
Description=Redis 6.0.9
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
ExecStart=/usr/local/redis/redis-6.0.9/src/redis-server /usr/local/redis/redis-6.0.9/src/redis.conf
ExecStop=/usr/local/redis/redis-6.0.9/src/redis-cli -h 127.0.0.1 -p 6379 shutdown
PrivateTmp=true

[Install]
WantedBy=multi-user.target
原文地址:https://www.cnblogs.com/jonney-wang/p/13952317.html