真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

apache-httpd-server-創(chuàng)新互聯(lián)

  很久沒(méi)有寫(xiě)過(guò)博客了,今天心血來(lái)潮記錄下源碼安裝httpd的過(guò)程,如果有錯(cuò)誤希望大家提出來(lái),也好改進(jìn),謝謝廣大博友apache-httpd-serverapache-httpd-serverapache-httpd-server

創(chuàng)新互聯(lián)建站專(zhuān)注于呼瑪企業(yè)網(wǎng)站建設(shè),成都響應(yīng)式網(wǎng)站建設(shè)公司,商城系統(tǒng)網(wǎng)站開(kāi)發(fā)。呼瑪網(wǎng)站建設(shè)公司,為呼瑪?shù)鹊貐^(qū)提供建站服務(wù)。全流程按需定制制作,專(zhuān)業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)建站專(zhuān)業(yè)和態(tài)度為您提供的服務(wù)

      安裝環(huán)境:    Asianux3    內(nèi)核版本:Asianux   3.1

      軟件包:    httpd-2.4.12

                         pcre-8.20

                         apr-1.5.2

                         apr-util-1.5.4

      安裝步驟:

             1.環(huán)境檢查:系統(tǒng)是否安裝有apr apr-util pcre軟件包

                  #rpm -qa apr

                  apr-1.2.7-11

                  #rpm -qa apr-util

                  apr-util-1.2.7-7AXS3

                  #rpm -qa pcre

                  pcre-6.6-2.7

     這些軟件系統(tǒng)有自帶,但是也不能卸載與其他軟件還有依賴(lài)關(guān)系,所以需要安裝其他軟件,并且安裝到不同的路徑下

             2.開(kāi)始安裝前壓迫先安裝好開(kāi)發(fā)工具庫(kù),查看系統(tǒng)是否已安裝

                  #yum grouplist

                  基本系統(tǒng)

                  開(kāi)發(fā)

                  gnome庫(kù)

               我的系統(tǒng)已經(jīng)安裝,如果沒(méi)有安裝則執(zhí)行

                  #yum groupinstall "開(kāi)發(fā)工具 開(kāi)發(fā)庫(kù)"   命令進(jìn)行安裝

             3.檢查完環(huán)境既可以開(kāi)始安裝,要先安裝pcre 軟件,將軟件包拷貝到服務(wù)器

                  #tar -jxf pcre-8.20.tar.bz2              //解壓pcre軟件包

                  #ls                                                  //查看當(dāng)前目錄下會(huì)多出一個(gè)pcre-8.20目錄

                  #cd pcre-8.20                                //切換進(jìn)pcre目錄

                  #./configure --perfix=/usr/local/pcre

                                                                         //編譯病指定pcre安裝目錄

                  #make

                  #make check                                 //驗(yàn)證make結(jié)果,不是必須步驟

                  #make install

                  #ls  /usr/local/pcre                        //查看/usr/local/pcre

                  bin    include lib   share

              pcre安裝完成。

              4.安裝apr軟件

                   #tar zxf apr-1.5.2.tar.gz                //解壓apr軟件包

                   #cd apr-1.5.2

                   #./configure --prefix=/usr/local/apr

                                                                          //編譯apr.指定安裝路徑

                   #make

                   #make install

                   #ls /usr/local/apr

                   bin    include lib   build-1

                apr軟件包安裝完成

               5.安裝apr-util軟件

                   #tar zxf apr-util-1.5.4.tar.gz        //解壓util軟件包

                    #cd apr-util-1.5.4

                   #./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

                                   //編譯util軟件包,指定安裝目錄并制定apr軟件安裝目錄。因?yàn)閡til依賴(lài)apr軟件

                   #make

                   #make install

                   #ls /usr/local/apr-util

                   bin    include lib

                apr-util軟件安裝完成

                6.就要安裝httpd軟件了,安裝前還要檢查selinux是否被禁用(disabled)

                   #vim /etc/selinux/config

                    SELINUX=disabled

                   #tar jxf httpd-2.4.12.tar.bz2          //解壓軟件包

                   #cd httpd-2.4.12

                    #./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/use/local/pcre --sysconfdir=/etc/httpd --enable-so --enable-rewirte --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mods-shared=most                           //編譯,指定apr,apr-util 和pcre安裝路徑和模塊選擇,必須的模塊得有so,rewirte ssl,cgi

                   #make

                   #make install

                   #ls /usr/local/apache/bin          //查看bin目錄,apachetl是啟動(dòng)腳本

                    ab    checkgid    envvers-std     htdbm    httpd    rotatelogs     apachectl

                   dbmmanage      fcgistarter      htdigest    httxt2dbm   apxs     envvare

                   htcacheclean        htpasswd      logresolve

                 7.啟動(dòng)httpd服務(wù)

                   #/usr/local/apache/bin/apachectl start        //啟動(dòng)httpd服務(wù)

                   #netstat -anput|grep httpd                           //查看80端口

                   tcp      0      0  :::80            :::*             LISTEN         6211/httpd

                 用瀏覽器訪問(wèn)默認(rèn)首頁(yè)   http:10.10.0.251   結(jié)果打開(kāi)的是歡迎界面,并沒(méi)有顯示it works

                 修改   #vim /etc/httpd/conf/httpd.conf     下的這一項(xiàng),首頁(yè)文件路徑

                           DocumentRoor "/usr/local/apache/htdocs"

                   再次打開(kāi),OK看到了  it   works  !!!

              再此更正一下,在后來(lái)啟動(dòng)服務(wù)時(shí),會(huì)有報(bào)錯(cuò),但是當(dāng)時(shí)卻沒(méi)有,可能是什么地方有其他配置把,現(xiàn)在 說(shuō)一下報(bào)錯(cuò)信息和解決辦法:

              報(bào)錯(cuò)信息如下:

              httpd: Syntax error on line 144 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dir.so into server: /usr/local/apache2/modules/mod_dir.so: undefined symbol: apr_array_clear

              總是提示apr的錯(cuò)誤,重新編譯也不行,后來(lái)添加 --with-included-apr參數(shù),在重新編譯,并且還要把a(bǔ)pr和apr-util的的源碼復(fù)制到http-2.4.12/srclib目錄下才可以

                 #cp  -rf apr-1.5.2 httpd-2.4.12/srclib/apr

                 #cp  -rf apr-util-1.5.4 httpd-2.4.12/srclib/apr-util

             ok ,重新啟動(dòng)就沒(méi)有問(wèn)題了

                安裝過(guò)程中遇到的問(wèn)題:提示如下,

                util_pcre.c: In function 'ap_regcomp':
                util_pcre.c:128: error: 'PCRE_DUPNAMES' undeclared (first use in this function)
                util_pcre.c:128: error: (Each undeclared identifier is reported only once
                util_pcre.c:128: error: for each function it appears in.)

               問(wèn)題在于pcre軟件沒(méi)有裝上,在make的時(shí)候就會(huì)有這個(gè)提示,安裝pcre軟件后就可以了

               2. 在選擇模塊的時(shí)候可以使用./configure --help 命令來(lái)選擇所需要的模塊

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿(mǎn)足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。


分享題目:apache-httpd-server-創(chuàng)新互聯(lián)
網(wǎng)站地址:http://weahome.cn/article/dhepgh.html

其他資訊

在線咨詢(xún)

微信咨詢(xún)

電話咨詢(xún)

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部