cent7 /usr/lib/systemd/system/
systemctl enable crond.service #让某服务开机启动
systemctl disable crond.service #不开机启动
systemctl status crond.service #查看服务状态
systemctl start crond.service #启动某服务
systemctl stop crond.service #停止某服务
systemctl restart crond.service #重启某服务
systemctl is-enabled crond #查看某服务是否开机启
systemctl enable crond.service #让某服务开机启动
systemctl disable crond.service #不开机启动
systemctl status crond.service #查看服务状态
systemctl start crond.service #启动某服务
systemctl stop crond.service #停止某服务
systemctl restart crond.service #重启某服务
systemctl is-enabled crond #查看某服务是否开机启
2018-05-21
CentOS7下服务启动:
启动服务:
systemctl start httpd
停止服务:
systemctl stop httpd
重启服务(先停止,后启动):
systemctl restart httpd
重新加载(使用新的配置文件):
systemctl reload httpd
显示服务状态:
systemctl status httpd
启动服务:
systemctl start httpd
停止服务:
systemctl stop httpd
重启服务(先停止,后启动):
systemctl restart httpd
重新加载(使用新的配置文件):
systemctl reload httpd
显示服务状态:
systemctl status httpd
2018-05-05