新增nginx.service文件;更新README.md文件

This commit is contained in:
huty 2024-05-14 09:26:00 +00:00 committed by cloud-init created default user
parent 079d7fe4ff
commit 2d723a65a7
2 changed files with 20 additions and 0 deletions

View File

@ -26,6 +26,11 @@ examples/redis.service
examples/tomcat.service examples/tomcat.service
``` ```
- nginx
``` bash
examples/nginx.service
```
### 安装目录 ### 安装目录
``` bash ``` bash
/usr/lib/systemd/system/ /usr/lib/systemd/system/

15
examples/nginx.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=nginx
After=network.target
[Service]
Type=forking
User=root
ExecStart=/opt/nginx/1.26.0/sbin/nginx
ExecReload=/opt/nginx/1.26.0/sbin/nginx -s reload
ExecStop=/opt/nginx/1.26.0/sbin/nginx -s stop
PrivateTmp=true
Restart=always
[Install]
WantedBy=multi-user.target