tar zxvf httpd-2.2.8.tar.gz #解压 cd httpd-2.2.8 #进入apache安装目录 ./configure --prefix=/data/apache --enable-so --enable-rewrite=shared --enable-vhost-alias=shared #配置apache,指定安装目录为/data/apache,开启DSO功能,基于URL规则处理,启用大量虚拟主机支持 make make install
tar vjxf libpng-1.2.28.tar.bz2 cd libpng-1.2.28 ./configure --prefix=/data/imagelib #如果make check时出错,请make cleaa && make uninstall && rm -rf config.cache make check #然后在运行./configure --prefix=/data/imagelib前运行./autogen.sh make install
tar vjxf freetype-2.3.5.tar.bz2 cd freetype-2.3.5 ./configure --prefix=/data/imagelib #特别注意,配置完成后要进入freetype源码目录(如prefix/freetype-2.3.5/include/freetype)修改freetype.h文件 #否则在下面编译GD的时候会出现ft2build.h hasn't been included yet 等系列错误。编辑vi freetype.h: 把 ifndef FT_FREETYPE_H 到 endif 中间的内容改为如下 # #include <ft2build.h> # #include FT_FREETYPE_H # #warning "`ft2build.h' hasn't been included yet!" # #warning "Please always use macros to include FreeType header files." # #warning "Example:" # #warning " #include <ft2build.h>" # #warning " #include FT_FREETYPE_H" # #warning "Source Mage has included this for you, but please fix it" make make install
vi /etc/ld.so.conf.d/imagelib.conf #加入我们安装软件的库路径。如(/data/imagelib/lib)然后执行ldconfig命令。 ldconfig
tar zxvf gd-2.0.9.tar.gz cd gd-2.0.9 INDIR=/data/imagelib ./configure --prefix=$INDIR --with-png=$INDIR --with-freetype=$INDIR --with-jpeg=$INDIR --with-zlib=$INDIR --with-libiconv-prefix=$INDIR make #如果出现以下错误 ft2build.h' hasn't been included yet 等错误,请看上面freetype的解决方法。 make install