参考文章:https://blog.youkuaiyun.com/lishuoboy/article/details/89676041
systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体。
以firewalld.service为例
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
设置开机自启动一个服务:systemctl enable firewalld.service
设置开机禁止启动服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看开机启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed