centos64 安裝apache

1.下載安裝包與依賴包 apache

http://httpd.apache.org/download.cgi 測試

http://apache.etoak.com/apr/apr-1.4.6.tar.gz spa

http://apache.etoak.com/apr/apr-util-1.5.1.tar.gz .net

http://sourceforge.net/projects/pcre/files/pcre/ 進程


2.安裝順序 get

apr-1.4.6.tar.gz it

apr-util-1.5.1.tar.gz file

perl-5.18.0.tar.gz cgi

pcre-8.33.tar.gz perl

httpd-2.4.4.tar.gz


3.運行安裝命令

sudo root

mkdir /opt/source

tar -zxvf apr-1.4.6.tar.gz -C /opt/source

tar -zxvf apr-util-1.5.1.tar.gz -C /opt/source

tar -zxvf perl-5.18.0.tar.gz -C /opt/source

tar -zxvf pcre-8.33.tar.gz -C /opt/source

tar -zxvf httpd-2.4.4.tar.gz -C /opt/source


mkdir /opt/apr

mkdir /opt/apr-util

mkdir /opt/perl

mkdir /opt/pcre

mkdir /opt/apache


cd /opt/source/apr-1.4.6

./configure --prefix=/opt/apr

make

make install


cd /opt/source/apr-util-1.5.1

./configure --prefix=/opt/apr-util

make

make install


cd /opt/source/ perl-5.18.0


./configure --prefix=/opt/perl

make

make install


cd /opt/source/ pcre-8.33


./configure --prefix=/opt/pcre

make

make install



cd /opt/source/httpd-2.4.4

./configure --prefix=/opt/apache --enable-so --enable-rewrite=shared --with-mpm=prefork --with-apr=/opt/apr --with-apr-util=/opt/apr-util --with-pcre=/opt/pcre

make

make install



4.運行與測試

/opt/apache/bin/apachectl start

ps aux | grep httpd

看到進程安裝成功

訪問:http://apache 地址

5. 製做service啓動

cp /opt/apache/bin/apachectl /etc/init.d/httpd

相關文章
相關標籤/搜索