systemd基础
现代Linux的init系统。PID 1进程。管理所有服务。systemctl是主命令。
常用命令
systemctl start/stop/restart nginx。systemctl status nginx。systemctl enable nginx开机自启。
自定义service
在/etc/systemd/system/下写xxx.service文件。[Unit]、[Service]、[Install]三段。写完systemctl daemon-reload。
声明:本站文章均来源于原创、转载、AI生成等渠道,如有版权及其他问题,请点击反馈,我公司会尽快查实并处理。
