systemctl
systemctl是CentOS7的服務管理工具中主要的工具,它融合之前service和chkconfig的功能於一體。
# 啓動一個服務:
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