编译安装nginx,并使用systemd管理nginx

#tar zxvf nginx-1.8.1.tar.gz

#cd nginx-1.8.1/

#make && make install

#cat /etc/systemd/system/nginx.service

[Unit]

Description=nginx server daemon

Documentation=man:nginx(8)

After=network.target

[Service]

Type=forking

ExecStart=/usr/local/nginx1.8.1/sbin/nginx

ExecReload=/usr/local/nginx1.8.1/sbin/nginx -s reload

ExecStop=/usr/local/nginx1.8.1/sbin/nginx -s quit

PrivateTmp=true

[Install]

WantedBy=multi-user.target

#systemctl daemon-reload

#systemctl start nginx.service

#systemctl enable nginx.service

#systemctl status nginx.service

上一篇:自定义事件解决重复请求BUG


下一篇:[20181015]为什么是3秒.txt