service httpd start |
systemctl start httpd.service |
启动httpd服务 |
service httpd stop |
systemctl stop httpd.service |
关闭httpd服务 |
service httpd restart |
systemctl restart httpd.service |
重启httpd服务,无论httpd服务当前状态 |
service httpd reload |
systemctl reload httpd.service |
重载httpd配置信息而不中断服务 |
service httpd condrestart |
systemctl condrestart httpd.service |
重启httpd服务,只当httpd启动状态动作 |
service httpd status |
systemctl status httpd.service |
查看httpd服务的运行状态 |
chkconfig httpd on |
systemctl enable httpd.service |
设置httpd服务开机启动 |
chkconfig httpd off |
systemctl disable httpd.service |
禁止httpd服务开机启动 |
chkconfig httpd |
systemctl is-enabled httpd.service |
检查httpd服务在当前环境下的状态 |
chkconfig --list |
systemctl list-unit-files --type=service |
输入在加个运行级别下所有服务的启动和禁用情况 |
chkconfig httpd --list |
ls /etc/systemd/system/*.wants/httpd.service |
查看httpd服务在各个级别下的启动和禁用情况 |
chkconfig httpd --add |
systemctl daemon-reload |
创建一个新服务文件或者变更配置时使用 |