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?重啟
要在重啟 Apache 服務器時不中斷當前的連接,則應運行:
/usr/local/sbin/apachectl graceful
如果apache安裝成為linux的服務的話,可以用以下命令操作:
service httpd start 啟動
service httpd restart 重新啟動
service httpd stop 停止服務
?
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
其實最后可以 sudo service apache2 start/restart/stop
總結
以上是生活随笔為你收集整理的linux 下 apache启动、停止、重启命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ubuntu14.04下搭建LAMP环境
- 下一篇: 在Linux上安装CHM查看工具