centos5.5 安装apache2.4.2

Apache 2.4.2 安装:

1.下载文件到download文件

cd /download

wgethttp://mirrors.axint.net/apache/httpd/httpd-2.4.2.tar.gz

wgethttp://mirrors.axint.net/apache/apr/apr-1.4.6.tar.gz

wgethttp://mirrors.axint.net/apache/apr/apr-util-1.4.1.tar.gz

wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz

 2.解压文件

tar zxvf httpd-2.4.2.tar.gz

tar zxvf apr-1.4.6.tar.gz

tar zxvf apr-util-1.4.1.tar.gz

tar zxvf pcre-8.30.tar.gz

 3、移动apr到srclib

mv apr-1.4.6 httpd-2.4.2/srclib/apr

mv apr-util-1.4.1 httpd-2.4.2/srclib/apr-util

 4.安装pcre-8.30(--prefix 指的是安装文件目录)

     cd /tmp/pcre-8.30

./configure

make

make install

5、安装apache-2.4(安装目录为/usr/local/apache)

cd /tmp/httpd-2.4.2

./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-apr --with-mpm=prefork

make && make install

cp -f build/rpm/httpd.init /etc/init.d/httpd

chmod +x /etc/init.d/httpd

chkconfig --add httpd

chkconfig httpd on

cd /etc

mv httpd httpd_old

ln -s /usr/local/apache/ httpd

cd /usr/sbin/

ln -fs /usr/local/apache/bin/httpd

ln -fs /usr/local/apache/bin/apachectl

cd /var/log

rm -rf httpd/

ln -s /usr/local/apache/logs httpd

# service httpd restart


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值