久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Apache遇到的問(wèn)題:APR not found

 昵稱(chēng)12872905 2013-06-22

Apache安裝遇到的問(wèn)題:APR not found

#./configure --prefix……檢查編輯環(huán)境時(shí)出現(xiàn):

checking for APR... no
configure: error: APR not found .  Please read the documentation.

可以用./configure –help | grep apr 查看幫助,。
--with-included-apr     Use bundled copies of APR/APR-Util
--with-apr=PATH         prefix for installed APR or the full path to apr-config
--with-apr-util=PATH    prefix for installed APU or the full path to
安裝APR(Apache Portable Runtime )
下載:http://apr./download.cgi

#cd /tmp/52lamp/ //源碼存放位置
#tar -zxvf apr-1.4.2.tar.gz //unzip -o apr-1.4.2.zip
#cd apr-1.4.2
#./configure
#make
#make install

再次檢查編譯環(huán)境出現(xiàn)

checking for APR-util... no
configure: error: APR-util not found .  Please read the documentation.

#./configure –help | grep apr-util
--with-apr-util=PATH    prefix for installed APU or the full path to

下載:http://download./download/0001000/472.shtml
#tar -zxvf apr-util-1.3.9.tar.gz
#cd apr-util-1.3.9
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install

./configure仍提示APR-util not found,增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util后出現(xiàn)
configure: error: pcre-config for libpcre not found. PCRE is required and available from http:///

#./configure –help | grep pcre
--with-pcre=PATH        Use external PCRE library

下載:http:///projects/pcre
#unzip -o pcre-8.10.zip
#cd pcre-8.10
#./configure --prefix=/usr/local/pcre
#make
#make install

繼續(xù)安裝Apache/httpd,,./configure 時(shí)加上參數(shù) --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre,,這個(gè)問(wèn)題就解決了

注意:Apache在安裝時(shí)不會(huì)檢查參數(shù)是否正確,錯(cuò)誤的參數(shù)會(huì)直接被丟棄,,不會(huì)報(bào)告給用戶(hù),。但可以使用echo $?命令檢查是否有錯(cuò)誤,,當(dāng)輸出結(jié)果為0時(shí)表示沒(méi)有錯(cuò)誤。

#echo $?
0

#make
#make install

復(fù)制Apache啟動(dòng)文件
#cp /usr/local/httpd/bin/apachectl /sbin/

啟動(dòng)Apache
#apachectl start

設(shè)置Apache開(kāi)機(jī)自啟動(dòng)
#vi /etc/rc.d/rc.local
增加一行 /sbin/apachectl start

或者將httpd服務(wù)添加到ntsysv服務(wù)管理工具
#apachectl stop //關(guān)閉Apache以免不必要的麻煩
#cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/httpd
#vi /etc/rc.d/init.d/httpd
修改為
#!/bin/sh
#
#chkconfig: 345 85 15 //#不能省略,,注意空格
#description: httpd for 52lamp 20101016 21:54 //任意字符串
#
......

第二行中345的含義:
#       0 - operation completed successfully
#       1 -
#       2 - usage error
#       3 - httpd could not be started
#       4 - httpd could not be stopped
#       5 - httpd could not be started during a restart

修改有關(guān)權(quán)限
#cd /etc/rc.d/init.d/
#chmod a+x httpd
#chkconfig --add httpd

#ntsysv
httpd已經(jīng)在列表中,,按F1可以看到剛才編寫(xiě)的服務(wù)描述httpd for 52lamp 20101016 21:54。

#apachectl start
#ps -e |grep httpd
23247 ?        00:00:00 httpd
23248 ?        00:00:00 httpd
23249 ?        00:00:00 httpd
23251 ?        00:00:00 httpd
23252 ?        00:00:00 httpd

在瀏覽器中輸入127.0.0.1,,看起來(lái)一切正常,;但是局域網(wǎng)內(nèi)其他電腦不能訪問(wèn)!

#service iptables stop

如果不想關(guān)閉防火墻,,放開(kāi)80端口即可,。

#vi /etc/sysconfig/iptables
增加一行-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
#service iptables restart //重啟防火墻

現(xiàn)在一切OK

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,,不代表本站觀點(diǎn),。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào),。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多