ubuntu 源码安装nginx的systemd的启动文件
作者:
Odven | 来源:发表于
2020-04-23 09:14 被阅读0次
1. 二进制安装的nginx
./configure --prefix=/usr/local/nginx/ --user=www-data --group=www-data --with-http_ssl_module
2. nginx的systemd的文件 nginx.service
vim /lib/systemd/system/nginx.service
[Unit]
Description=A high performance web server and a reverse proxy
server
After=network.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target
本文标题:ubuntu 源码安装nginx的systemd的启动文件
本文链接:https://www.haomeiwen.com/subject/xlznihtx.html
网友评论