[root@vm10-37-2-16 data]# cat /lib/systemd/system/redis-sentinel.service [Unit] Description=redis-server After=network.target [Service] Type=forking ExecStart=/usr/bin/redis-server /usr/local/redis/etc/sentinel.conf --sentinel PrivateTmp=true [Install] WantedBy=multi-user.target
[root@vm10-37-2-16 data]# cat /lib/systemd/system/redis.service [Unit] Description=redis-server After=network.target [Service] Type=forking ExecStart=/usr/bin/redis-server /usr/local/redis/etc/redis.conf PrivateTmp=true [Install] WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable redis
systemctl enable redis-sentinel.service