Welcome 微信登录

首页 / 操作系统 / Linux / Apache-2.4.x 编译安装方法

apache-2.2与新出的apache-2.4安装不同的地方在于,2.4版的已经不自带apr库,所以在安装apache-2.4之前,需要下载apr。1、下载软件cd /tmp
wget http://mirrors.axint.net/apache//httpd/httpd-2.4.2.tar.gz
wget http://mirrors.axint.net/apache//apr/apr-1.4.6.tar.gz
wget http://mirrors.axint.net/apache//apr/apr-util-1.4.1.tar.gz
tar xzf httpd-2.4.2.tar.gz
tar xzf apr-1.4.6.tar.gz
tar xzf apr-util-1.4.1.tar.gz2、移动apr到srclibmv apr-1.4.6 httpd-2.4.2/srclib/apr
mv apr-util-1.4.1 httpd-2.4.2/srclib/apr-util3、安装apache-2.4cd /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 httpdyum常用命令介绍Ubuntu下计划任务cron的使用相关资讯      Apache配置 
  • Apache2.4.9 多域名多网站配置  (今 11:54)
  • Linux下配置Apache与Tomcat连接  (04月16日)
  • Ubuntu Apache 虚拟主机配置  (01月25日)
  • CentOS 6.8下Apache服务器安装和配  (09月01日)
  • Linux下Apache的安装与配置  (04月11日)
  • RHEL 7 Apache MPM 配置  (12/13/2015 15:34:40)
本文评论 查看全部评论 (0)
表情: 姓名: 字数