資源描述:
《centos6.3安裝apache和tomcat》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(kù)。
1、Centos6.3安裝apache和Tomcat安裝apache第一部分:準(zhǔn)備工作。1.全新centos6.3(以下簡(jiǎn)稱centos)最基本的設(shè)置略過(guò)(比如用戶、網(wǎng)絡(luò)設(shè)置等等)。2.這里可以聯(lián)網(wǎng)了。這里用到的我不寫到一起了。安裝wget工具。[root@localhost?~]#?yum-yinstallwget安裝GCC軟件套件[root@localhost?~]#?yum-yinstallgcc[root@localhost?~]#?yum-yinstallgcc-c++安裝make[root@localhost?~]#?yum-yinst
2、allmake安裝vim[root@localhost?~]#?yum-yinstallvim?3.下載各個(gè)安裝包:基本上多是官網(wǎng)提供的源。[root@localhost?~]#?wgethttp://apache.etoak.com/httpd/httpd-2.4.3.tar.gz[root@localhost?~]#?wget?http://apache.etoak.com/apr/apr-1.4.6.tar.gz[root@localhost?~]#?wgethttp://apache.etoak.com/apr/apr-util-1.5
3、.1.tar.gz[root@localhost?~]#?wget?http://hk1.php.net/distributions/php-5.4.8.tar.gz[root@localhost?~]#?wget?ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz[root@localhost?~]#?wget?http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-
4、2.5.8.tar.gz(注意大小寫,不然會(huì)報(bào)404錯(cuò)誤的。)[root@localhost?~]#ls查看下有沒有全部下好,如圖片中紅色的就是剛剛下載的。?4.以上源碼包全部用tar?zxvf?xxx.tar.gz解壓縮[root@localhost?~]#?tar?zxvf?httpd-2.4.3.tar.gz[root@localhost?~]#tar?zxvf?apr-1.4.6.tar.gz[root@localhost?~]#tar?zxvf?apr-util-1.5.1.tar.gz[root@localhost?~]#?tar?
5、zxvf?php-5.4.8.tar.gz[root@localhost?~]#?tar?zxvf?pcre-8.31.tar.gz[root@localhost?~]#tar?zxvf?libmcrypt-2.5.8.tar.gz[root@localhost?~]#ls查看如圖中藍(lán)色的就是解壓好文件夾。?第二部分:安裝Apache。1.安裝apache依賴包pcre[root@localhost?~]#?cd./pcre-8.31[root@localhost?~]#?./configure--prefix=/usr/local/pcre[
6、root@localhost?~]#?make&&makeinstall?2.安裝openssl[root@localhost?~]#?yum-yinstall?openssl-devel?3.移動(dòng)apr和apr-util到httpd-2.4.3文件夾下srclib內(nèi)并且重命名(手動(dòng)將文件移進(jìn)去并改名)[root@localhost?~]#?mvapr-1.4.6/httpd-2.4.3/srclib/apr[root@localhost?~]#mvapr-util-1.5.1/httpd-2.4.3/srclib/apr-util?4.安裝A
7、pache2.4.3主程序[root@localhost?~]#cd./httpd-2.4.3[root@localhost?~]#./configure?--prefix=/usr/local/apache?--enable-so?--enable-deflate=shared?--enable-ssl=shared?--enable-expires=shared?--enable-headers=shared?--enable-rewrite=shared?--enable-static-support?--with-included-ap
8、r?--with-mpm=prefork?--enable-cache?--enable-file-cache?--with-pcre=/usr/lo