记录linux创建进入服务单元

2024-09-02 21:48:37 浏览数 (1)

redis.service 配置

代码语言:txt复制
[Unit]
Description=redis-server
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/gahc/redis/src/redis-server /usr/local/gahc/redis/redis.conf
ExecStop=/usr/local/gahc/redis/src/redis-cli -a Ytd@2003 -p 6379 shutdown
PrivateTmp=true
TimeoutStopSec=30s
KillMode=mixed
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=redis

[Install]
WantedBy=multi-user.target

0 人点赞