linux apache停止命令,Linux和windows下apache重启、启动、停止命令总结

  • Post author:
  • Post category:linux


当apache安装成系统服务时,可以通过一下命令操作:

启动:service httpd start

重启:service httpd restart

暂停:service httpd stop

我的CentOS 6.9系统为可以通过以下命令操作:

重启:/etc/init.d/httpd restart

启动:/etc/init.d/httpd start

暂停:/etc/init.d/httpd stop

当安装目录在/usr/local/apache下时:

启动:/usr/local/apache/bin/apachectl start

停止:/usr/local/apache/bin/apachectl stop

重启:/usr/local/apache/bin/apachectl restart

当window安装好apache时,可以通过以下命令操作:

找到安装目录/apache/bin,通过ApacheMonitor.exe可已经行重启等

或者cmd命令,进入安装目录/bin/

停止:httpd.exe -k stop

重启:httpd.exe -k restart

启动:httpd.exe -k start