这篇文章主要为大家展示了“Linux系统中怎么重启、停止apache”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Linux系统中怎么重启、停止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 重启
/usr/local/apache2/bin/apachectl restart 重启
要在重启 Apache 服务器时不中断当前的连接,则应运行:
/usr/local/sbin/apachectl graceful
如果apache安装成为linux的服务的话,可以用以下命令操作:
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务
service httpd status 查看服务状态
centos7后可以使用systemctl 替换service 进行操作
systemctl start httpd 启动
systemctl restart httpd 重新启动
systemctl stop httpd 停止服务
systemctl status httpd 查看服务状态
Linux系统为Ubuntu
一、Start Apache 2 Server /启动apache服务
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重启apache服务
\# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
三、Stop Apache 2 Server /停止apache服务
\# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
以上是“Linux系统中怎么重启、停止apache”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注天达云行业资讯频道!