Rumah > pembangunan bahagian belakang > tutorial php > linux下php gd 库的安装步骤

linux下php gd 库的安装步骤

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Lepaskan: 2016-07-25 08:55:11
asal
1100 orang telah melayarinya
  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
复制代码


Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan