php5安装GD库步骤分享

WBOY
Release: 2016-07-25 08:55:17
Original
1269 people have browsed it
  1. cd libpng-1.2.40
  2. mv scripts/makefile.linux ./Makefile #一定要使用script下的Makefile ,不要通过./configure
复制代码

生成:

  1. make
  2. make install
复制代码

2,下载freetype库,很多GD函数都需要此库的支持 http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.5.tar.gz

解压后,进入目录:

  1. cd freetype-2.3.5
  2. ./configure --prefix=/usr/local/freetype #指定freetype的安装目录,以便php编译时用到
  3. make
  4. make install
复制代码

3,下载GD库 从http://www.libgd.org上选择合适的版本下载

解压后,进入目录:

  1. ./configure --prefix=/usr/local/gd2 --with-png --with-freetype #不需要指定freetype目录,需要指定gd库的安装路径
  2. make
  3. make install
复制代码

4,编译PHP

进入php源码目录:

  1. ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --without-sqlite --
  2. without-pdo-sqlite --with-gd=/usr/local/gd2 --with-freetype-dir=/usr/local/freetype/
  3. make
  4. make install
复制代码

重启apache服务,完成PHP5 GD库的安装。



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!