1.装zlib tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 CFLAGS="-O3 -fPIC" ./configure //使用64位元的方法进行编译 make make install 2.安装libpng tar zxvf libpng-1.2.8.tar.gz cd libpng-1.2.8 cd scripts/ mv makefile.linux ../makefile cd .. make make install 注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个 3、安装 freetype tar -zxf freetype-2.1.10.tar.gz cd freetype-2.1.10 ./configure --prefix=/usr/local/freetype make;make install 4.安装Jpeg tar zxvf jpegsrc.v6b.tar.gz cd jpeg-6b/ ./configure --enable-shared make make test make install 注意,这里configure一定要带--enable-shared参数,不然,不会生成共享库 5、gd安装 tar zxvf gd-2.0.33.tar.gz cd gd-2.0.33 ./configure --with-png --with-freetype=/usr/local/freetype/ --with-jpeg make make install 命令完成后,gd.h被拷到/usr/local/lib目录下,libgd.a被拷到/usr/local/lib目录下。 6、php安装支持gd,freetype... ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/svn-apache/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with- gd=/usr/local/lib --with-imagick=/usr/local/imagemagick --with-freetype-dir=/usr/local/freetype --with-zlib --with-png --with-jpeg --enable-ftp --enable-fastcgi --enable-fpm - -enable-sockets make make install cp php.ini-development /usr/local/php/lib/php.ini cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
php5.4 要求的gd库,php5.4.13支持GD库和freetype
最新推荐文章于 2021-04-02 17:56:25 发布