当前互联网主流Web服务器说明
1、IIS  微软的web服务器
2、apache   中小web服务器主流,web服务器中的老大哥
3、nginx   新兴的web服务器主流
4、tomcat  中小企业动态服务器,互联网java容器主流
5、resin    大型企业动态服务器,互联网java容器主流
apache的特点及应用场合
特点:功能强大,配置简单,速度快,应用广泛,性能稳定可靠,并可做代理服务器和负载均衡
应用场合:
1、使用apache来运行静态html网页,图片,处理静态小文件能力不及nginx
2、使用apache结合php引擎来运行php程序,lamp由此成为经典组合
3、使用apache结合tomcat及resin运行jsp java等程序,成为中小企业的首选
4、使用apache做代理及负载均衡
本次环境所用到的软件版本如下(操作系统CentOS6.7)

1、基础环境准备 
[root@ansible tools]# tar xf apr-1.4.5.tar.gz  
[root@ansible tools]# cd apr-1.4.5 
[root@ansible apr-1.4.5]# ./configure --prefix=/usr/local/apr 
[root@ansible apr-1.4.5]# make && make install

[root@ansible tools]# tar xf apr-util-1.3.12.tar.gz  
[root@ansible tools]# cd apr-util-1.3.12 
[root@ansible apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config  
[root@ansible apr-util-1.3.12]# make && make install

[root@ansible pcre-8.10]# unzip pcre-8.10.zip  
[root@ansible tools]# cd pcre-8.10 
[root@ansible pcre-8.10]# ./configure --prefix=/usr/local/pcre 
[root@ansible pcre-8.10]# make && make install

[root@ansible tools]# tar xf libxml2-2.7.6.tar.gz  
[root@ansible tools]# cd libxml2-2.7.6 
[root@ansible libxml2-2.7.6]# vim configure    将下面那行注释掉                       
#    $RM "$cfgfile" 
[root@ansible libxml2-2.7.6]# ./configure --prefix=/usr/local/libxml2 --without-zlib 
[root@ansible libxml2-2.7.6]# make && make install
[root@ansible tools]# tar xf libmcrypt-2.5.8.tar.gz  
[root@ansible tools]# cd libmcrypt-2.5.8 
[root@ansible libmcrypt-2.5.8]# ./configure --prefix=/usr/local/libmcrypt 
[root@ansible libmcrypt-2.5.8]# make && make install 
  
[root@ansible tools]# tar xf zlib-1.2.5.tar.gz  
[root@ansible tools]# cd zlib-1.2.5 
[root@ansible zlib-1.2.5]# ./configure  
[root@ansible zlib-1.2.5]# make && make install 
  
[root@ansible tools]# tar xf libpng-1.4.1.tar.gz  
[root@ansible tools]# cd libpng-1.4.1 
[root@ansible libpng-1.4.1]# ./configure --prefix=/usr/local/libpng 
[root@ansible libpng-1.4.1]# make && make install 
  
[root@ansible tools]# mkdir /usr/local/jpeg6 
[root@ansible tools]# mkdir /usr/local/jpeg6/bin 
[root@ansible tools]# mkdir /usr/local/jpeg6/lib 
[root@ansible tools]# mkdir /usr/local/jpeg6/include 
[root@ansible tools]# mkdir -p /usr/local/jpeg6/man/man1 
[root@ansible tools]# tar xf jpegsrc.v6b.tar.gz  
[root@ansible tools]# cd jpeg-6b/ 
[root@ansible jpeg-6b]# ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static 
[root@ansible jpeg-6b]# make && make  报错 
./libtool --mode=compile gcc -O2  -I. -c ./jcapimin.c 
make: ./libtool: Command not found 
make: *** [jcapimin.lo] Error 127 
  
解决方法 
[root@ansible tools]# tar xf libtool-2.2.6a.tar.gz  
[root@ansible tools]# cd libtool-2.2.6 
[root@ansible libtool-2.2.6]# ./configure  
[root@ansible libtool-2.2.6]# make && make install 
  
[root@ansible libtool-2.2.6]# cd ../jpeg-6b/ 
[root@ansible jpeg-6b]# cp /usr/share/libtool/config/config.sub . 
[root@ansible jpeg-6b]# cp /usr/share/libtool/config/config.guess . 
[root@ansible jpeg-6b]#  ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static 
[root@ansible jpeg-6b]# make && make 
  
[root@ansible tools]# tar xf freetype-2.3.12.tar.gz  
[root@ansible tools]# cd freetype-2.3.12 
[root@ansible freetype-2.3.12]# ./configure --prefix=/usr/local/freetype 
[root@ansible freetype-2.3.12]# make && make install 
  
[root@ansible tools]# tar xf autoconf-2.61.tar.gz  
[root@ansible tools]# cd autoconf-2.61 
[root@ansible autoconf-2.61]# ./configure  
[root@ansible autoconf-2.61]# make && make install 
  
[root@ansible tools]# tar xf libgd-2.1.1.tar. 
libgd-2.1.1.tar.gz  libgd-2.1.1.tar.xz   
[root@ansible tools]# tar xf libgd-2.1.1.tar.gz  
[root@ansible tools]# cd libgd-2.1.1 
[root@ansible libgd-2.1.1]#  ./configure \ 
> --prefix=/usr/local/gd2/ \ 
> --enable-m4_pattern_allow \ 
> --with-zlib=/usr/local/zlib/ \ 
> --with-jpeg=/usr/local/jpeg6/ \ 
> --with-png=/usr/local/libpng/ \ 
> --with-freetype=/usr/local/freetype/
[root@ansible libgd-2.1.1]#  make && make install

