创建服务文件
vim /etc/systemd/system/server_uwsgi.service
写入以下内容
[Unit]
Description=PDF_merge Server
After=syslog.target
[Service]
KillSignal=SIGQUIT
ExecStart=uwsgi --ini (配置文件路径)uwsgi.ini
Restart=always
Type=notify
NotifyAccess=all
StandardError=syslog
[Install]
WantedBy=multi-user.target
服务注册
systemctl enable /etc/systemd/system/server_uwsgi.service
这篇博客介绍了如何创建并注册一个名为PDF_mergeServer的Systemd服务文件,用于管理UWSGI进程。通过编辑`/etc/systemd/system/server_uwsgi.service`,设置KillSignal、ExecStart等参数,并指定uwsgi.ini配置文件路径,确保服务在multi-user.target下启动。最后,使用systemctl enable命令启用服务,实现服务的自动启动。
881

被折叠的 条评论
为什么被折叠?



