怎样重启 / 停止 / 启动Apache2的服务?
一、StartApache2Server/启动apache服务#/etc/init.d/apache2startor$sudo/etc/init.d/apache2start二、RestartApache2Server/重启apache服务#/etc/init.d/apache2restartor$sudo/etc/init.d/apache2restart三、StopApache2Server/停止apache服务#/etc/init.d/apache2stopor$sudo/etc/init.d/apache2stop
如何使用service脚本来启动,停止,重启apache服务?
本文假设你的apahce安装目录为/usr/local/apache2,这些方法适合任何情况apahce启动命令:推荐/usr/local/apache2/bin/apachectl start apaceh启动apache停止命令/usr/local/apache2/bin/apachectl stop 停止apache重新启动命令:/usr/local/apache2/bin/apachectl restart 重启要在重启 Apache 服务器时不中断当前的连接,则应运行:/usr/local/sbin/apachectl graceful如果apache安装成为linux的服务的话,可以用以下命令操作:service httpd start 启动service httpd restart 重新启动