Ray Studio

博学之,审问之,慎思之,明辨之,笃行之
posts - 2, comments - 1, trackbacks - 0, articles - 2

[转]gd库的安装

Posted on 2006-03-02 12:01 蓉之恋 阅读(138) 评论(0)  编辑  收藏 所属分类: Linux

gd库的安装


在系统监控中一般借助图形直观显示,大多数绘图程序是php编写的。这些程序需要php支持图形库,以便提供必要的函数;为了支持更多的格式,需要安装gd库并重编译php
php
默认的配置只能处理GIF图像,不能处理JPEG图像,gd库本来是支持GIF的,但由于GIF使用了有版权争议的LZW算法,会引起法律问题;从GD-1.6开始,GD库不再支持GIF,改为支持更好的,无版权争议的PNG。通过gd库可同时支持GIF PNGJPEG等。

以下简述安装过程:

安装freetype
tar zxvf freetype-2.1.10.tar.gz
./configure
make && make install

:
安装zlib
tar -zxvf zlib-1.2.3.tar.gz
cd zlib.1.2.3
./configure
make && make install

:
安装libpng
tar -zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
cp scripts/makefile.std makefile
make test
make install

:
安装jpeg
tar -zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --enable-share --enable-static
make; make install

:
安装GD
tar -zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/gd --with-jpeg --with-png --with-zlib --with-freetype=/usr/local/freetype/lib
make && make install

重新编译 php,推荐4.4.1版本
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib --with-png --with-jpeg --with-freetype --enable-sockets
make && make install


只有注册用户登录后才能发表评论。


网站导航: