http://www.nowamagic.net/librarys/veda/detail/2610

安装gd前置库: freetype, jpegsrc, libpng

1. freetype
wget "http://download.savannah.gnu.org/releases/freetype/freetype-2.4.0.tar.bz2"
tar jxvf freetype-2.4.0.tar.bz2
cd freetype-2.4.0
./configure --prefix=/usr/local/freetype && make && make install

2. jpegsrc
wget "http://www.ijg.org/files/jpegsrc.v9.tar.gz"
tar zxvf jpegsrc.v9.tar.gz
cd jpeg-9
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/jpeg && make && make install
mkdir -p /usr/local/jpeg/include
mkdir -p /usr/local/jpeg/lib
mkdir -p /usr/local/jpeg/bin
mkdir -p /usr/local/jpeg/man/man1

3. libpng
wget "http://down1.chinaunix.net/distfiles/libpng-1.2.10.tar.bz2"
tar jxvf libpng-1.2.10.tar.bz2
cd libpng-1.2.10
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/libpng && make && make install

4. 编译gd
cd php-4.4.9
cd ext
cd gd

/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/freetype --with-zlib-dir=/usr/lib

make && make install

5. 修改php.ini文件
在 ;extension=php_zip.dll 下面添加一行
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/gd.so

[转载~笔记]CentOS单独编译安装PHP gd库扩展的更多相关文章

  1. CentOS单独编译安装PHP gd库扩展

    注意:如果您已经编译安装过GD库,请重新编译安装php不带gd库成功后,执行以下操作 安装libpng wget http://jaist.dl.sourceforge.net/project/lib ...

  2. CentOS6.8单独编译安装PHP gd库扩展

    # PHP-GD安装 #在安装之前可以先更新一下yum源,可以使用国内的阿里云源 yum -y install libjpeg-turbo-devel yum -y install freetype- ...

  3. 烂泥:centos单独编译安装gd库

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 这几天一直在弄一个商城系统,该系统的源码及数据库都已经上传并创建完毕.但是在安装该系统时,却提示缺少gd库.如下: 使用php探针查看,发现php确实没 ...

  4. 转:在CentOS下编译安装GCC

    转:https://teddysun.com/432.html 在CentOS下编译安装GCC 技术  秋水逸冰  发布于: 2015-09-02  更新于: 2015-09-02  6519 次围观 ...

  5. centos下编译安装lnmp

    centos下编译安装lnmp 本文以centos为背景在其中编译安装nginx搭建lnmp环境. 编译安装nginx时,需要事先安装 开发包组"Development Tools" ...

  6. CentOS 7 编译安装 Code::Blocks

    CentOS 7 编译安装 Code::Blocks yum install cairo-devel yum install pango-devel yum install atk-devel yum ...

  7. centos mysql 编译安装

    centos mysql 编译安装 1.安装 创建MySQL用户 sudo useradd mysql 下载MySQL的源码包,我们这里使用的时5.5.18 安装依赖 sudo yum -y inst ...

  8. CentOS 下编译安装Apache

    CentOS 下编译安装Apache 卸载原有的apache 首先从 http://httpd.apache.or 下载apache源码包httpd-2.4.4.tar.gz然后从 http://ap ...

  9. linux centos系统 php安装GD库扩展

    yum --enablerepo=remi-php56 install php-gd php-mysql php-mbstring php-xml php-mcrypt //安装GD库扩展 servi ...

随机推荐

  1. Spark RDD类源码阅读

    每天进步一点点~开搞~ abstract class RDD[T: ClassTag]( //@transient 注解表示将字段标记为瞬态的 @transient private var _sc: ...

  2. Spring Boot 静态资源处理

    spring Boot 默认的处理方式就已经足够了,默认情况下Spring Boot 使用WebMvcAutoConfiguration中配置的各种属性. 建议使用Spring Boot 默认处理方式 ...

  3. 【转载】Securing Kibana + Elasticsearch

    from: http://tom.meinlschmidt.org/2014/05/19/securing-kibana-elasticsearch/ After some successful se ...

  4. metasploit升级(BT5)

    1.apt-get update 2.apt-get install metasploit 3.修改文件:/opt/metasploit/ruby/lib/ruby/1.9.1/i686-linux/ ...

  5. Linux 使用 su 切换用户提示 Authentication Failure 的解决方法

    Ubuntu v14.04,使用 su 命令切换用户时报验证失败的错误 这个问题产生的原因是由于 ubuntu 系统默认是没有激活 root 用户的,需要我们手工进行操作,在命令行界面下,或者在终端中 ...

  6. python 版本问题大全

    坑一 一下午的时间又让这个不是问题的问题给白白给浪费了,此片文章仅仅纪念一下浪费掉的宝贵时间 新式类与经典类问题 class qwe: def __init__(self, name): self.n ...

  7. 关键字static和this

    1.this关键字 this:代表当前对象,就是代表所在函数所属类的引用.哪个对象调用了this所在的函数,this就代表哪个对象. this关键字也可以用于在构造函数中调用其他构造函数,此时要注意, ...

  8. PIC32MZ tutorial -- Input Capture

    Today I accomplish a simple application for PIC32MZ EC Starter Kit. This application uses Input Capt ...

  9. Ubuntu14.04安装MySQL-python异常: mysql_config: not found,Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-MJWMPd/MySQL-python/

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABUoAAAE8CAIAAACZ6RwMAAAgAElEQVR4nOydaVxTx9fHn9dhKWqltv

  10. jquery的扩展之extend函数

    1.$.extend()使用 作用:扩展全局的函数 $.extend({ sayHellow:function(pram){ alert(pram+"hellow"); } }) ...