统信UOS systemctl 控制服务

MoMo 2022年5月20日14:03:55
评论
223

示例:

apt install apache2

systemctl status apache2

cat /lib/systemd/system/apache2.service apache2 服务启动文件

systemctl start apache2

ps aux | grep apache2

ps aux 查看进程

systemctl stop apache2

systemctl restart apache2

systemctl enable apache2

开机自启动

/etc/systemd/system/multi-user.target.wants/apache2.service enable 其实是是建立 apache2 服

务软链接

systemctl disable apache2

取消开机自启动

systemctl mask apache2

屏蔽服务,永远不能启动

systemctl unmask apache2

取消屏蔽

https://xpanx.com/
MoMo
  • 本文由 发表于 2022年5月20日14:03:55
  • 转载请务必保留本文链接:https://xpanx.com/3683.html
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: