Centos 7.0系统服务管理

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

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

1 systemctl

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

systemctl | grep "服务名称"

3.更改系统服务的状态

# 启动指定服务(重启后无效)
systemctl start 服务名
# 停止指定服务(重启后无效)
systemctl stop 服务名
# 重启指定服务(重启后无效)
systemctl restart 服务名
# 开启指定服务
systemctl enable 服务名
# 关闭指定服务
systemctl disable 服务名
原文地址:https://www.cnblogs.com/koboshi/p/4036301.html