从Centos7开始,不再用sysvinit管理系统服务了,而是改用了systemd,因此对系统服务管理方法已经变更,以下简述

1.查看当前所有系统服务的状态

1 systemctl

2.查看指定系统服务的状态

systemctl | grep "服务名称"

3.更改系统服务的状态

# 启动指定服务(重启后无效)
systemctl start 服务名
# 停止指定服务(重启后无效)
systemctl stop 服务名
# 重启指定服务(重启后无效)
systemctl restart 服务名
# 开启指定服务
systemctl enable 服务名
# 关闭指定服务
systemctl disable 服务名

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2021-07-11
  • 2021-06-29
  • 2021-11-30
  • 2021-06-09
  • 2021-06-19
  • 2021-12-31
  • 2021-10-25
相关资源
相似解决方案