CentOS7 systemctl的使用
0赞
发表于 2016/2/28 9:38:45
阅读(1126)
# 查看正在运行的服务
systemctl
# 查看某个服务的状态
systemctl status httpd.service
# 启动服务
systemctl start foo.service
如:systemctl start httpd.service
# 停止服务
systemctl stop foo.service
如:systemctl stop httpd.service
# 重启服务
systemctl restart foo.service
如:systemctl restart httpd.service
# 重新加载配置文件
systemctl reload foo.service
如:systemctl reload httpd.service
# 开机时启动一个服务
systemctl enable foo.service
如:systemctl enable httpd.service
# 开机时关闭一个服务
systemctl disable foo.service
如:systemctl disable httpd.service
# 查看服务是否开机启动
systemctl is-enabled foo.service
如:systemctl is-enabled httpd.service