歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

CentOS6.5下源碼編譯安裝httpd2.4.23

CentOS6.5下源碼編譯安裝httpd2.4.23


CentOS6.5下源碼編譯安裝httpd2.4.23


1、安裝環境為CentOS6.5,64位

[root@mylinuxapp]#uname-r2.6.32-504.30.3.el6.x86_64[root@mylinuxapp]#cat/etc/redhat-releaseCentOSrelease6.5(Final)[root@mylinuxapp]#

2、官網上下載源碼包

wgethttp://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.23.tar.gz

3、解壓目錄,進入進行configure配置操作,指定安裝路徑

./configure--prefix=/application/httpdcheckingforchosenlayout...Apachecheckingforworkingmkdir-p...yescheckingforgrepthathandleslonglinesand-e.../bin/grepcheckingforegrep.../bin/grep-Echeckingbuildsystemtype...x86_64-unknown-linux-gnucheckinghostsystemtype...x86_64-unknown-linux-gnucheckingtargetsystemtype...x86_64-unknown-linux-gnuconfigure:configure:ConfiguringApachePortableRuntimelibrary...configure:checkingforAPR...noconfigure:error:APRnotfound.Pleasereadthedocumentation.

4、當提示沒有檢測到APR時,我們需要到官網下載最新版apr包,解壓安裝。

wgethttp://archive.apache.org/dist/apr/apr-1.4.5.tar.gzwgethttp://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gztar-xfapr-1.4.5.tar.gzcdapr-1.4.5./configure--prefix=/usr/local/aprmake&&makeinstalltar-xfapr-util-1.5.4.tar.gzcdapr-util-1.5.4./configure--prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-configmake&&makeinstall

5、再次來安裝httpd,此時指定apr

[root@mylinuxhttpd]#./configure--prefix=/application/httpd--with-apr=/usr/local/apr/bin/apr-1-config............Installingheaderfilesmkdir/application/httpd/includeInstallingbuildsystemfilesmkdir/application/httpd/buildInstallingmanpagesandonlinemanualmkdir/application/httpd/manmkdir/application/httpd/man/man1mkdir/application/httpd/man/man8mkdir/application/httpd/manualmake[1]:Leavingdirectory`/application/app/httpd-2.4.23'[root@mylinuxhttpd]#make&&makeinstall

6、啟動httpd,測試服務是否啟動

[root@mylinuxhttpd]#/application/httpd/bin/httpd[root@mylinuxhttpd]#lsof-i:80COMMANDPIDUSERFDTYPEDEVICESIZE/OFFNODENAMEhttpd5440root3uIPv4460886160t0TCP*:http(LISTEN)httpd5441daemon3uIPv4460886160t0TCP*:http(LISTEN)httpd5442daemon3uIPv4460886160t0TCP*:http(LISTEN)httpd5443daemon3uIPv4460886160t0TCP*:http(LISTEN)httpd5573daemon3uIPv4460886160t0TCP*:http(LISTEN)

7、添加man幫助文件

vim /etc/man.config
添加MANPATH /application/httpd/man

此時就可以使用man命令查看httpd的幫助文檔了。

http://xxxxxx/Linuxjc/1156004.html TechArticle

Copyright © Linux教程網 All Rights Reserved