最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法

 更新時(shí)間:2019年03月15日 10:27:49   作者:小菜鳥(niǎo)有大夢(mèng)想  
這篇文章主要介紹了Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法,結(jié)合實(shí)例形式分析了Centos7.4服務(wù)器安裝apache相關(guān)命令、配置操作及端口占用等常見(jiàn)問(wèn)題解決方法,需要的朋友可以參考下

本文實(shí)例講述了Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法。分享給大家供大家參考,具體如下:

一、安裝httpd

1. 安裝之前,先查看系統(tǒng)中是否存在已經(jīng)安裝了的httpd.rpm包,如果,沒(méi)有就是沒(méi)安裝,有的話rpm -e 對(duì)應(yīng)的rpm包名進(jìn)行刪除

#rpm -qa | grep httpd

2. 使用yum安裝(自動(dòng)安裝依賴包),簡(jiǎn)單方便

#yum -y install httpd

3. 安裝成功后,httpd-v 查看安裝的apache版本,查找apache的配置文件位置

#find / -name "httpd.conf"

4. 將找到的源配置文件備份一份,防止錯(cuò)誤后無(wú)法恢復(fù)

#cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak

5. 啟動(dòng)Apache服務(wù)

#systemctl start httpd.service

6. 開(kāi)機(jī)自動(dòng)啟動(dòng)Apache服務(wù)

#systemctl enable httpd.service 開(kāi)機(jī)自啟httpd
#systemctl disable httpd.service 開(kāi)機(jī)不啟動(dòng)httpd

7. 查看httpd的狀態(tài)

#systemctl status httpd.service

二、安裝過(guò)程出現(xiàn)的問(wèn)題

1. Apache啟動(dòng)失敗,Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details

執(zhí)行命令,查看報(bào)錯(cuò)提示

#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.

問(wèn)題是80端口被占用

解決辦法:

查看80端口的使用情況

① .netstat -lnp|grep 80

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

殺掉占用80端口的進(jìn)程

② .kill -9 846

③ .若是前兩個(gè)方法不行的話,則重啟后再啟動(dòng)httpd服務(wù)

2.Apache啟動(dòng)失敗,httpd:httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

① .進(jìn)入apache的配置文件

vi /etc/httpd/conf/httpd.conf

② ./ServerName 查找ServerName

#ServerName www.example.com:80

將其前面的#去掉

:wq保存并退出

③ .重啟服務(wù)

systemctl restart httpd.service

希望本文所述對(duì)大家CentOS服務(wù)器配置有所幫助。

相關(guān)文章

  • Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法

    Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法

    這篇文章主要介紹了Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法,結(jié)合實(shí)例形式分析了Centos7.4服務(wù)器安裝apache相關(guān)命令、配置操作及端口占用等常見(jiàn)問(wèn)題解決方法,需要的朋友可以參考下
    2019-03-03
  • ubuntu系統(tǒng)下apache配置虛擬主機(jī)及反向代理詳解

    ubuntu系統(tǒng)下apache配置虛擬主機(jī)及反向代理詳解

    這篇文章主要介紹了ubuntu系統(tǒng)下apache配置虛擬主機(jī)及反向代理的相關(guān)資料,文中通過(guò)實(shí)例給大家演示的非常詳細(xì),對(duì)大家具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下來(lái)一起學(xué)習(xí)學(xué)習(xí)吧。
    2017-06-06
  • Linux中g(shù)it用https連接時(shí)不用每次輸入密碼的方法

    Linux中g(shù)it用https連接時(shí)不用每次輸入密碼的方法

    這篇文章主要給大家介紹了關(guān)于Linux中g(shù)it使用https連接時(shí)不用每次輸入密碼的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2018-06-06
  • Linux 出現(xiàn)telnet: 127.0.0.1: Connection refused錯(cuò)誤解決辦法

    Linux 出現(xiàn)telnet: 127.0.0.1: Connection refused錯(cuò)誤解決辦法

    這篇文章主要介紹了Linux 出現(xiàn)telnet: connect to address 127.0.0.1: Connection refused錯(cuò)誤解決辦法的相關(guān)資料,需要的朋友可以參考下
    2017-05-05
  • linux手動(dòng)、自動(dòng)更改網(wǎng)卡MAC地址的方法

    linux手動(dòng)、自動(dòng)更改網(wǎng)卡MAC地址的方法

    這篇文章主要給大家介紹了關(guān)于linux如何手動(dòng)、自動(dòng)更改網(wǎng)卡MAC地址的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用linux具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2018-06-06
  • Linux yum軟件包管理方法

    Linux yum軟件包管理方法

    今天小編就為大家分享一篇Linux yum軟件包管理方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2019-07-07
  • Linux虛擬機(jī)如何改中文

    Linux虛擬機(jī)如何改中文

    這篇文章主要介紹了Linux虛擬機(jī)如何改中文問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-08-08
  • centos中文件與權(quán)限的基本操作教程

    centos中文件與權(quán)限的基本操作教程

    這篇文章主要給大家介紹了關(guān)于centos文件與權(quán)限的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2018-09-09
  • 在Linux中配置IPv4和IPv6地址的方法詳解

    在Linux中配置IPv4和IPv6地址的方法詳解

    IPv4和IPv6是Internet上常用的兩種IP地址協(xié)議,在Linux系統(tǒng)中,您可以通過(guò)配置網(wǎng)絡(luò)接口來(lái)設(shè)置IPv4和IPv6地址,本文將詳細(xì)介紹如何在Linux中配置IPv4和IPv6地址,需要的朋友可以參考下
    2024-09-09
  • Apache上傳文件500錯(cuò)誤的解決方法

    Apache上傳文件500錯(cuò)誤的解決方法

    Apache 2.3.6開(kāi)始,MaxRequestLen這個(gè)參數(shù)的默認(rèn)值從之前的1GB(汗一個(gè))調(diào)整到了131072字節(jié)(128KB)。于是上傳128KB以下的文件不會(huì)出問(wèn)題,但是超過(guò)這個(gè)值就會(huì)報(bào)500錯(cuò)誤了
    2014-04-04

最新評(píng)論

苍山县| 洞头县| 双柏县| 柳州市| 滦南县| 高碑店市| 泸州市| 惠安县| 建水县| 永丰县| 双流县| 东城区| 连江县| 鹤岗市| 逊克县| 阳谷县| 东丰县| 原阳县| 阿城市| 麻江县| 靖远县| 汾阳市| 吉木萨尔县| 秦安县| 平舆县| 资兴市| 叙永县| 闽清县| 台中县| 科技| 故城县| 湟中县| 利辛县| 辉县市| 通州区| 旅游| 璧山县| 荔波县| 灵山县| 醴陵市| 临海市|