日期:2014-05-16  浏览次数:20665 次

linux下 GD库支持freetype
要使用gd库生成icon等,需要支持

yum install freetype-devel


php安装脚本

#!/bin/bash




tar zxvf php-5.3.2.tar.gz
cd php-5.3.2
yum -y install gd-devel
yum -y install libmcrypt
yum -y install libmcrypt-devel
yum -y install curl-devel
yum -y install freetype-devel

CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --prefix=/home/programs/php-5.3.2 --enable-fastcgi --with-mysql=/home/programs/mysql --enable-
zend-multibyte --enable-zip --enable-discard-path --enable-force-cgi-redirect --with-libxml-dir --with-curl=/home/programs/curl --with-openssl --with-mysqli 
--with-pdo-mysql=/home/programs/mysql --with-zlib --enable-mbstring --with-gd --with-jpeg-dir=/usr/local/ --with-png-dir=/usr/local --with-mcrypt 
--enable-exif  --with-ttf --with-iconv  --enable-mbstring --enable-xml --enable-sockets --enable-mbstring --with-snmp --with-freetype-dir=/usr/include/freetype2/
make clean
make
make install