歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

centos安裝apache詳細教程

使用root用戶安裝需要的環境:

(1)

[code]yum install gcc gcc-c++[/code]

(2)

APR和APR-UTIL的下載地址:http://apr.apache.org/download.cgi

安裝apr:

[root@localhost apache]# tar -zxf apr-1.4.6.tar.gz

[root@localhost apache]# cd apr-1.4.6

[root@localhost apr-1.4.6]# ./configure –prefix=/usr/local/apr

[root@localhost apr-1.4.6]# make

[root@localhost apr-1.4.6]# make install

apr-util安裝:

[root@localhost apache]# tar -zxf apr-util-1.4.1.tar.gz

[root@localhost apache]# cd apr-util-1.4.1

[root@localhost apr-util-1.4.1]# ./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr/bin/apr-1-config

[root@localhost apr-util-1.4.1]# make
[root@localhost apr-util-1.4.1]# make install

(3)

下載地址:http://ftp.exim.llorien.org/pcre/

下載pcre-8.30.zip ,列表文件較多,一般浏覽器會有搜索功能,你可ctrl+f 搜索定位後下載。

[root@localhost apache]#unzip -o pcre-8.30.zip

[root@localhost apache]#cd pcre-8.30

[root@localhost pcre-8.30]#./configure –prefix=/usr/local/pcre

[root@localhost pcre-8.30]#make

[root@localhost pcre-8.30]#make install

1、下載httpd-2.4.10.tar.gz

網址:http://httpd.apache.org/download.cgi#apache24

2、編譯源碼

[code] <strong>./configure –prefix=/usr/local/apache2 –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util/</strong><strong> </strong> [/code]

3、make

4、make install

Copyright © Linux教程網 All Rights Reserved