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生成等渠道,如有版權及其他問題,請點擊反饋,我公司會盡快查實並處理。