Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4158500
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: C/C++

2012-10-22 21:03:38

apache 2.4已经不自带apr库,需要独立安装
wget
wget
wget
 
tar xzf httpd-2.4.3.tar.gz
tar xzf apr-1.4.6.tar.gz
tar xzf apr-util-1.4.1.tar.gz
 
mv apr-1.4.6 httpd-2.4.3/srclib/apr
mv apr-util-1.4.1 httpd-2.4.3/srclib/apr-util 
 
cd httpd-2.4.3
./configure --with-included-apr --with-php --with-mysql --with-suse xec --disable-info --with-mpm=prefork --enable-so --enable-cgi --enable-rewrite --enable-ssl --enable-mime-magic --enable-unique-id --enable-mods-shared=all --enable-ssl=shared --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http
注意去除空格
make
make install

注意 不要指定--prefix=/app/apache,否则出现error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apache2/lib
因为编译使用了shared modules,必须添加LoadModule authz_host_module modules/mod_authz_host.so,否则出现 Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config

 

验证apxs安装
/usr/local/apache2/bin/apxs -c -i


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

mkdir -p httpd/conf.d

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

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

阅读(2857) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~