一、systemd服务文件
Nginx Apache 等软件,通过使用 systemctl 来管理系统进程。
比如查看 Nginx 的进程状态:
systemctl status nginx
# output
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-12-17 02:16:33 UTC; 2 weeks 6 days ago
Docs: man:nginx(8)
Main PID: 609 (nginx)
Tasks: 3 (limit: 4713)
Memory: 11.5M
CGroup: /system.slice/nginx.service
├─609 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─610 nginx: worker process
└─611 nginx: worker process
Dec 17 02:16:26 hongkong-morgon systemd[1]: Starting A high performance web server and a reverse

本文详细介绍了如何使用systemd管理服务文件,包括Nginx和Apache等,以及自定义systemd服务文件的步骤。此外,还讲解了openssh的在线升级过程,提供了一个批量升级脚本的示例。
订阅专栏 解锁全文
2595

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



