码迷,mamicode.com
首页 > 其他好文 > 详细

redis和nginx配置systemctl

时间:2021-05-03 12:28:31      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:oca   rev   emctl   art   quit   sign   rem   exe   bin   

REDIS6.x:

[Unit]
Description=Redis Database
After=network.target
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
PIDFile=/var/run/redis_6379.pid
ExecStart=/usr/local/redis/redis-6.2.1/src/redis-server /usr/local/redis/redis-6.2.1/redis.conf  --supervised systemd
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/usr/local/redis/redis-6.2.1/src/redis-cli shutdown
#ExecStop=/usr/local/redis/redis-6.2.1/src/redis-cli -a password shutdown 2>/dev/null
PrivateTmp=true

[Install]
WantedBy=multi-user.target

 





NGINX:

[Unit]
Description=The nginx HTTP and reverse proxy server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/usr/local/apps/nginx/logs/nginx.pid
ExecStartPre=/usr/bin/rm -f /usr/local/apps/nginx/logs/nginx.pid
ExecStartPre=/usr/local/apps/nginx/sbin/nginx -t
ExecStart=/usr/local/apps/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true

[Install]
WantedBy=multi-user.target

 

redis和nginx配置systemctl

标签:oca   rev   emctl   art   quit   sign   rem   exe   bin   

原文地址:https://www.cnblogs.com/kaka-xi/p/14723781.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!