檢查 apache 伺服器 httpd 的執行狀況:
/etc/rc.d/init.d/httpd status
如果伺服器是執行中,會顯示類似下列信息:
httpd (pid 779 778 777 776 775 774 773 772 769) is running...
如果伺服器沒有執行,會顯示下列信息:
httpd is stopped
或者
ps ax | grep httpd
啟動 apache 伺服器:
/etc/rc.d/init.d/httpd start
停止 apache 伺服器:
/etc/rc.d/init.d/httpd stop
其實 /etc/rc.d/init.d/httpd 是一個 script
,用來協助我們啟動/停止 apache。這個 script 總共有五個參數可供選擇:
start / stop
/ restart / reload
/ status
|