免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1501 | 回复: 0
打印 上一主题 下一主题

PHP拓展gd库 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-22 08:54 |只看该作者 |倒序浏览
下载
zlib-1.2.2.tar.gz
jpegsrc.v6b.tar.gz
libpng-1.2.7.tar.tar
freetype-2.1.9.tar.gz
gd-2.0.33.tar.gz
安装
1.安装zlib
# tar zxvf zlib-1.2.5.tar.gz //解压
# cd zlib-1.2.5 //改变目录
# CFLAGS=”-O3 -fPIC” ./configure   //使用64位的方法进行编译 (一般只需要./configure)
# make
# make install
2.2.安装libpng
tar zxvf libpng-1.2.7.tar.tar
cd libpng-1.2.7
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个
3.安装freetype
tar zxvf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure --prefix=/usr/local/modules/freetype 
make
make install
d.jpeg
# wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz //下载
# tar jpegsrc.v8b.tar.gz //解压
# cd jpeg-8b //改变目录
# ./configure –prefix=/usr/local/modules/jpeg7 –enable-shared –enable-static  //配置
# make //编译
# make install  //安装

e.GD
# wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz //下载
# tar xzvf gd-2.0.33.tar.gz //解压
# cd gd-2.0.33 //改变目录
# ./configure –prefix=/usr/local/modules/gd –with-jpeg=/usr/local/modules/jpeg7 –with-png=/usr/local/libpng –with-zlib –with-freetype=/usr/local/modules/freetype  //配置
# make //编译
# make install  //安装

4.PHP
a.libxml2  //只拓展gd,这个可以不装
# wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz //下载
# tar zxvf libxml2-2.7.2.tar.gz //解压
# cd libxml2-2.7.2 //改变目录
# ./configure –prefix=/usr/local/libxml2 //配置
# make //编译
# make install //安装
b.curl (系统安装了就yum remove curl,然后下载一个新版的)  //只拓展gd,这个可以不装
# wget http://curl.haxx.se/download/curl-7.19.0.tar.gz //下载
# tar -zxvf curl-7.19.0.tar.gz //解压
# cd curl-7.19.0 //改变目录
# ./configure –prefix=/usr/local/curl //配置
# make //编译
# make install //安装
c.PHP
# wget http://cn.php.net/get/php-5.2.8.tar.bz2/from/us.php.net/mirror
# tar jxvf php-5.2.8.tar.bz2
# cd php*
./configure --prefix=/opt/app/php5 --with-mysql=/opt/app/mysql --with-curl=/opt/app/curl --with-gd=/usr/local/modules/gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/modules/jpeg7 --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/modules/freetype --with-zlib --enable-fastcgi --enable-debug --enable-sockets    //只拓展gd的安装步族,curl是先前安装的
 
# ./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql –with-libxml-dir=/usr/local/libxml2 –with-gd=/usr/local/modules/gd –with-png-dir=/usr/local/libpng –with-jpeg-dir=/usr/local/modules/jpeg6 –with-zlib  –with-freetype-dir=/usr/local/modules/freetype –enable-magic-quotes –with-apxs2=/usr/local/apache/bin/apxs  –enable-ftp –with-config-file-path=/usr/local/php/etc –with-iconv –with-gettext –with-curl=/usr/local/curl
# make
# make install
重启php即可
# cp php.ini-dist /usr/local/php/etc/php.ini  (这句。。。)
================================================
技术交流QQ:1359962567(↗freeda)
 
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP