Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> Linux教程 >> centos安裝apache詳細教程

centos安裝apache詳細教程

日期:2017/2/7 14:31:58      編輯:Linux教程
 

使用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 © Windows教程網 All Rights Reserved