>  기사  >  백엔드 개발  >  linux下php gd 库的安装步骤

linux下php gd 库的安装步骤

WBOY
WBOY원래의
2016-07-25 08:55:11993검색
  1. tar xzvf zlib-1.2.3.tar.gz
  2. cd zlib-1.2.3
  3. ./configure
  4. make
  5. make install
复制代码

2、安装freetype

  1. tar xzvf freetype-2.2.1.tar.gz
  2. cd freetype-2.2.1
  3. ./configure
  4. make
  5. make install
复制代码

3、安装libpng

  1. tar xzvf libpng-1.2.12.tar.gz
  2. cd libpng-1.2.12
  3. cp scripts/makefile.std makefile
  4. make test
  5. make install
复制代码

4、安装jpeg 建立文件包:/usr/local/man/man1

  1. tar xzvf jpegsrc.v6b.tar.gz
  2. ./configure --enable-shared --enable-static
  3. make
  4. make install
复制代码

注意,如果安装PHP5,必需安装libxml2

5、安装GD库

  1. tar xzvf gd-2.0.18.tar.gz
  2. ./configure --with-jpeg --with-png --with-zlib --with-freetype
  3. make
  4. make install
复制代码

二,更改apache的配置文件: 让apache能解释php程序。 1,查找AddType application/x-tar .tgz 行,在下面添加:

  1. AddType application/x-httpd-php .php
  2. AddType application/x-httpd-php .php3
  3. AddType application/x-httpd-php .phtml
  4. AddType application/x-httpd-php-source .phps
复制代码

2,找到下面一行在后面添加:index.php,表示网站的默认页也允许为index.php

  1. DirectoryIndex index.html index.html.var index.php
复制代码


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.