apachectl
apachectl指令是apache http伺服器的前端控制程式,可以協助控制apache服務的守護程序httpd。
此指令的适用範圍:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。
1、文法
apachectl cmd
2、參數清單
start
啟動apache httpd守護程序
restart
重新開機apache httpd守護程序
stop
停止apache httpd守護程序
status
顯示apache服務的簡要資訊
graceful
優雅的重新開機apache服務,它和restart不一樣,不會中斷目前已經打開的http連接配接,不會立刻關閉日志
graceful-stop
優雅的停止apache服務,它和stop不一樣,不會中斷目前已經打開的http連接配接,不會立刻關閉日志
configtest
運作apache配置文法檢測
3、執行個體
1)運作apache配置檔案測試
[root@localhost ~]# apachectl configtest //配置檔案檢測,沒有錯誤
httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
Syntax OK
2)重新開機服務
[root@localhost ~]# apachectl restart //重新開機
做了一個Linux學習的平台,目前出來一個雛形,各位可以參考使用
連結:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ 密碼:n7bk
![081634m8n8t2tmz2te95w5](https://yqfile.alicdn.com/4178a434b793f18ff7e0f285f98634611e3f707c.gif)