資源描述:
《linux下安裝apr及其apr-util的基本步驟》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(kù)。
1、Linux下安裝Apr及其Apr-util的基本步驟1.安裝apr#gzip-dapr-1.4.8.tar.gz#tarxvfapr-1.4.8.tar#cdapr-1.4.8#./configure--prefix=/opt/apr(注意:如果執(zhí)行時(shí)出現(xiàn)此錯(cuò)誤configure:error:noacceptableCcompilerfoundin$PATH執(zhí)行:yum-yinstallgcc前提條件:該機(jī)器可訪問互聯(lián)網(wǎng)。然后再執(zhí)行:./configure--prefix=/opt/apr)#make#makeinstall2.安裝apr-util#gzip-dapr-util-1.
2、5.2.tar.gz#tarxvfapr-util-1.5.2.tar#cdapr-util-1.5.2#./configure--prefix=/opt/apr-util--with-apr=/opt/apr#make#makeinstall3.安裝pcre#unzip-opcre-8.33.zip#cdpcre-8.33#./configure--prefix=/opt/pcre(注意:如果執(zhí)行時(shí)出現(xiàn)此錯(cuò)誤configure:error:YouneedaC++compilerforC++support執(zhí)行:yuminstall-ygccgcc-c++前提條件:該機(jī)器可訪問互聯(lián)網(wǎng)。
3、然后再執(zhí)行:./configure--prefix=/opt/pcre)#make#makeinstall4.安裝apache#gzip-dhttpd-2.4.6.tar.gz#tarxvfhttpd-2.4.6.tar#cdhttpd-2.4.6#./configure--prefix=/opt/apache--enable-modules=all--enable-mods-shared=all--enable-proxy--enable-proxy-connect--enable-proxy-ftp--enable-proxy-http--enable-proxy-ajp--en
4、able-proxy-balancer--enable-rewrite--enable-status--with-apr=/opt/apr--with-apr-util=/opt/apr-util/--with-pcre=/opt/pcre#make#makeinstall5.配置apache開機(jī)自啟動(dòng)在/etc/rc.local(或者/etc/rc.d/rc.local)中加入如下一下/opt/apache/bin/apachectl-kstart查看是否正常啟動(dòng):ps-ef
5、grephttpd[root@LINUX128~]#ps-ef
6、grephttpdroot26451020
7、:43?00:00:00/opt/apache/bin/httpd-kstartdaemon26462645020:43?00:00:00/opt/apache/bin/httpd-kstartdaemon26472645020:43?00:00:00/opt/apache/bin/httpd-kstartdaemon26482645020:43?00:00:00/opt/apache/bin/httpd-kstartroot27492472520:46pts/000:00:00grephttpd6.常見問題解決:?jiǎn)?dòng)時(shí)提示異常:AH00558:httpd:Couldnotrelia
8、blydeterminetheserver'sfullyqualifieddomainname,using192.168.2.128.Setthe'ServerName'directivegloballytosuppressthismessage解決方法:更新/etc/hosts文件,把里面的ip改成機(jī)器真實(shí)IP;啟動(dòng)時(shí)提示異常:httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,using127.0.0.1forServerName解決方法:編輯httpd.conf文件,搜索"#ServerName"
9、,添加ServerNamelocalhost:80日志文件里面有:AH01177:Failedtolookupprovider'shm'for'slotmem':ismod_slotmem_shmloaded??解決方法:編輯httpd.conf文件,把#LoadModuleslotmem_shm_modulemodules/mod_slotmem_shm.so前的#號(hào)去掉日志文件里面有:[alert](EAI3)Temporaryfailureinnam