apache2.4在centos6.5上

1、安装准备
ps aux|grep httpd    //查看apache是否启动且有进程
yum install pcre-devel -y    //安装依赖
yum -y groupinstall
2、安装最小化源码安装的依赖
#安装apr和apr-util
cd /usr/local/src/
wget http://mirrors.koehn.com/apache//apr/apr-1.5.2.tar.gz
wget http://mirrors.koehn.com/apache//apr/apr-util-1.5.4.tar.gz
tar zvxf apr-1.5.2.tar.gz
tar zxvf apr-util-1.5.4.tar.gz
cd apr-1.5.2
./configure –prefix=/usr/local/apr
yum install gcc gcc-devel    //编译发现缺少gcc依赖,安装gcc
./configure –prefix=/usr/local/apr
make && make install
cd ..
cd apr-util-1.5.4
./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr
make && make install
#下载apr-iconv
wget http://mirrors.koehn.com/apache//apr/apr-iconv-1.2.1.tar.gz
3、#安装apache2.4.9
wget http://archive.apache.org/dist/httpd/httpd-2.4.9.tar.gz
tar zxvf httpd-2.4.9.tar.gz
cd httpd-2.4.9
./configure –help|less    //查看最小化源码安装的需要
./configure –prefix=/usr/local/apache –sysconfdir=/etc/httpd24 –enable-so –enable-ssl enable-cgi –enable-rewrite –with-zlib –with-pcre –with-apr=/usr/local/apr-util/ –enable-modules=most –enable-mpms-shared-all –with-mpm-event
make
make install
echo $?
4、#软连接和启动准备
ln -sv /usr/local/apache/include /usr/include/httpd
ldconfig
ldconfig -p
5、#编写启动apache脚本
vim /etc/profile.d/httpd.sh  //export PATH=/usr/local/apache/bin:$PATH
. /etc/profile.d/httpd.sh
httpd -v
rpm -ql httpd
5、启动apache测试
apachectl start
ps aux |grep httpd

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值