systemd 服务
systemd 是主流 Linux 发行版的初始化系统,参见 systemd。
常用命令
systemctl status nginx # 查看服务状态
systemctl start nginx # 启动
systemctl enable nginx # 开机自启
journalctl -u nginx -f # 跟踪日志
单元文件
服务由 .service 单元文件描述,通常位于 /etc/systemd/system/。
修改后执行 systemctl daemon-reload 生效。
下一步
继续阅读 软件包管理。