# tar -zxvf httpd-2.2.9.tar.gz 解压源码包
# ./configure --prefix=/usr/local/apache \
> --enable-so \
> --enable-rewrite 编译前配置
# make 编译
# make install 安装
# vi /etc/rc.d/rc.local 加入开机启动
/usr/local/apache/bin/apachectl start 文件内添加
-----------------------------------------------apache安装完成----------------------------------------------------
三、安装php
先安装zlib,freetype,libpng,jpeg以便于让php支持GD库(Cacti的WeatherMap插件必须要较新的GD库支持)
安装组件(zlib,freetype,libpng,jpge)
zlib-1.2.3.tar.gz
# tar -zxvf zlib-1.2.3.tar.gz 解压zlib
# ./configure --prefix=/usr/local/zlib 编译前配置
# make 编译
# make install 安装
libpng-1.2.18.tar.gz
# tar -zxvf libpng-1.2.18.tar.gz 解压libpng
# ./configure --prefix=/usr/local/libpng 编译前配置
# make 编译
# make install 安装
freetype-2.3.5.tar.gz
# tar -zxvf freetype-2.3.5.tar.gz 解压
# ./configure --prefix=/usr/local/freetype 编译前配置
# make 编译
# make install 安装
jpegsrc.v7.tar.gz
# tar -zxvf jpegsrc.v7.tar.gz 解压
# mkdir /usr/local/libjpeg 创建目录
# mkdir /usr/local/libjpeg/bin
# mkdir /usr/local/libjpeg/lib
# mkdir /usr/local/libjpeg/man
# mkdir /usr/local/libjpeg/man/man1
# ./configure --prefix=/usr/local/libjpeg/ --enable-shared --enable-static 编译前配置
# make 编译
# make install 安装
fontconfig-2.4.2.tar.gz
# tar -zxvf fontconfig-2.4.2.tar.gz 解压
# ./configure --with-freetype-config=/usr/local/freetype/bin/freetype-config \
> --with-expat-lib=/usr/lib64/ 编译前配置
# make 编译
# make install 安装
libxml2-2.6.32.tar.gz
# tar -zxvf libxml2-2.6.32.tar.gz
# ./configure 编译前配置
# make 编译
# make install 安装
------------------------------------------组件安装完成-------------------------------------------------------------