版本V1.0
时间2012-10-04
版权GPL
作者itnihao 邮箱 [email protected]
博客 http://itnihao.blog.51cto.com
如需重新发行,请注明以上信息,谢谢合作
前言
本文档基于对apache的学习整理而成的笔记。本文档详细的记录了apache各种应用,以及一些个人的理解,如果偏差,请和我联系,以在下一个版本中进行更正。其中大部分文档均来自网络,感谢网络上各位朋友的分享,才有此文档的出现。其中本人对参考的部分网络文档进行适当的修改,以达到更好的参考效果。也希望各位积极的分享文档,为开源事业做出自己力所能及的贡献。
itnihao 2012年10月04日于成都
系统需安装以下软件包
为引起不必要的组件依赖麻烦,此处的参数为安装lamp,lnmp环境均需要的组件,一次性安装所有需要的
#!/bin/bash
for base in gcc gcc-c++ make cmake apr apr-util apr-util-ldap postgresql-libs zlib* openssl openssl-devel autoconf automake ncurses* libtool* libxslt libxslt-devel libxml* curl* bzip2* gd gd-devel freetype freetype-devel libpng* cairo-devel libxml2-devel pango pango-devel libmcrypt libpng jpeg bison mysql-devel
do rpm -qa |grep $base;retval=$?
[ "$retval" != 0 ] && yum install $base
done
源码的获取方式,官方网站
http://www.apache.org/dyn/closer.cgi
国内可以到搜狐,163镜像获取
wget http://mirrors.sohu.com/apache/httpd-2.2.22.tar.gz
tar zxvf httpd-2.2.22.tar.gz
cd httpd-2.2.22
完全编译方式,带了大部分的参数,此处没有加susexe配置
./configure \
--prefix=/usr/local/apache \
--with-mpm=prefork \
--enable-modules=all \
--enable-so \
--enable-FEATURE=shared \
--enable-mods-shared=all \
--enable-authn-dbm=shared \
--enable-authn-anon=shared \
--enable-authn-dbd=shared \
--enable-authn-alias=shared \
--enable-authz-dbm=shared \
--enable-authz-owner=shared \
--enable-auth-digest=shared \
--enable-authnz-ldap=shared \
--enable-ldap=shared \
--enable-isapi=shared \
--enable-proxy=shared \
--enable-proxy-connect=shared \
--enable-proxy-ftp=shared \
--enable-proxy-http=shared \
--enable-proxy-scgi=shared \
--enable-proxy-ajp=shared \
--enable-proxy-balancer=shared \
--enable-file-cache=shared \
--enable-cache=shared \
--enable-disk-cache=shared \
--enable-mem-cache=shared \
--enable-reqtimeout=shared \
--enable-ext-filter=shared \
--enable-substitute=shared \
--enable-charset-lite=shared \
--enable-log-forensic=shared \
--enable-logio=shared \
--enable-mime-magic=shared \
--enable-cern-meta=shared \
--enable-expires=shared \
--enable-headers=shared \
--enable-ident=shared \
--enable-usertrack=shared \
--enable-unique-id=shared \
--enable-ssl=shared \
--enable-optional-hook-export=shared \
--enable-optional-hook-import=shared \
--enable-optional-fn-import=shared \
--enable-optional-fn-export=shared \
--enable-static-support=shared \
--enable-static-htpasswd=shared \
--enable-static-htdigest=shared \
--enable-static-rotatelogs=shared \
--enable-static-logresolve=shared \
--enable-static-htdbm=shared \
--enable-static-ab=shared \
--enable-static-checkgid=shared \
--enable-static-htcacheclean=shared \
--enable-static-httxt2dbm=shared \
--enable-http \
--enable-dav=shared \
--enable-info=shared \
--enable-suexec=shared \
--with-program-name=shared \
--with-suexec-bin=shared \
--with-suexec-caller=shared \
--with-suexec-userdir=shared \
--with-suexec-docroot=shared \
--with-suexec-uidmin=shared \
--with-suexec-gidmin=shared \
--with-suexec-logfile=shared \
--with-suexec-safepath=shared \
--with-suexec-umask=shared \
--enable-suexec=shared \
--enable-cgi=shared \
--enable-cgid=shared \
--enable-dav-fs=shared \
--enable-dav-lock=shared \
--enable-vhost-alias=shared \
--enable-imagemap=shared \
--enable-speling=shared \
--enable-rewrite=shared
Configure完成
make && make install
常规的安装方式,可以不必带这么多参数,加一些关键的参数即可,下面是常规的安装参数
yum install httpd
本文出自 “itnihao的运维技术博客” 博客,请务必保留此出处http://itnihao.blog.51cto.com/1741976/1012147