2019-04-30 14:16:14 2492瀏覽
今天扣丁學(xué)堂Linux培訓(xùn)老師給大家分享一篇關(guān)于Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法,結(jié)合實(shí)例形式分析了Centos7.4服務(wù)器安裝apache相關(guān)命令、配置操作及端口占用等常見(jiàn)問(wèn)題解決方法,分享給大家供大家參考,具體如下:
#rpm -qa | grep httpd
#yum -y install httpd
#find / -name "httpd.conf"
#cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
#systemctl start httpd.service
#systemctl enable httpd.service 開(kāi)機(jī)自啟httpd #systemctl disable httpd.service 開(kāi)機(jī)不啟動(dòng)httpd
#systemctl status httpd.service
#systemctl status httpd.service
[root@cloud1 bin]# systemctl status httpd.service httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since 五 2018-11-26 11:13:09 CST; 6min ago Docs: man:httpd(8) man:apachectl(8) Process: 9915 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 9913 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 9913 (code=exited, status=1/FAILURE) 11月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 11月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 11月 26 11:13:09 cloud1.localdomain httpd[9913]: no listening sockets available, shutting down 11月 26 11:13:09 cloud1.localdomain httpd[9913]: AH00015: Unable to open logs 11月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE 11月 26 11:13:09 cloud1.localdomain kill[9915]: kill: cannot find process "" 11月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 11月 26 11:13:09 cloud1.localdomain systemd[1]: Failed to start The Apache HTTP Server. 11月 26 11:13:09 cloud1.localdomain systemd[1]: Unit httpd.service entered failed state. 11月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service failed.
tcp 0 0 192.168.180.68:61027 0.0.0.0:* LISTEN 6289/oproxyd tcp 0 0 :::80 :::* LISTEN 846/httpd tcp 0 0 ::ffff:192.168.180.68:7001 :::* LISTEN 32015/java
vi /etc/httpd/conf/httpd.conf
#ServerName www.example.com:80
systemctl restart httpd.service
【關(guān)注微信公眾號(hào)獲取更多學(xué)習(xí)資料】 【掃碼進(jìn)入HTML5前端開(kāi)發(fā)VIP免費(fèi)公開(kāi)課】
查看更多關(guān)于“Linux培訓(xùn)資訊”的相關(guān)文章>>