文章来源:CentOS 7设置开机启动服务,添加自定义系统服务
@H_502_3@
systemctl is-enabled servicename.service #查询服务是否开机启动@H_502_3@ systemctl enable *.service #开机运行服务@H_502_3@ systemctl disable *.service #取消开机运行@H_502_3@ systemctl start *.service #启动服务@H_502_3@ systemctl stop *.service #停止服务@H_502_3@ systemctl restart *.service #重启服务@H_502_3@ systemctl reload *.service #重新加载服务配置文件@H_502_3@ systemctl status *.service #查询服务运行状态@H_502_3@ systemctl --Failed #显示启动失败的服务
注:*代表某个服务的名字,如http的服务名为httpd