姓名:刘浩然。 2020年大目标Python

编译安装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

posted @ 2019-02-03 09:48  pluto2charon  阅读(669)  评论(0编辑  收藏  举报