您好,欢迎访问一九零五行业门户网

php5安装GD库步骤分享

cd libpng-1.2.40mv scripts/makefile.linux ./makefile #一定要使用script下的makefile ,不要通过./configure
复制代码
生成:
makemake install
复制代码
2,下载freetype库,很多gd函数都需要此库的支持http://ftp.twaren.net/unix/nongnu/freetype/freetype-2.3.5.tar.gz
解压后,进入目录:
cd freetype-2.3.5./configure --prefix=/usr/local/freetype #指定freetype的安装目录,以便php编译时用到makemake install
复制代码
3,下载gd库从http://www.libgd.org上选择合适的版本下载
解压后,进入目录:
./configure --prefix=/usr/local/gd2 --with-png --with-freetype #不需要指定freetype目录,需要指定gd库的安装路径makemake install
复制代码
4,编译php
进入php源码目录:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --without-sqlite --without-pdo-sqlite --with-gd=/usr/local/gd2 --with-freetype-dir=/usr/local/freetype/makemake install
复制代码
重启apache服务,完成php5 gd库的安装。
其它类似信息

推荐信息