登录  /  注册
linux下php gd 库的安装步骤
php中文网
发布: 2016-07-25 08:55:11
原创
631人浏览过
  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
复制代码


来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门推荐
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 技术文章
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2023 //m.sbmmt.com/ All Rights Reserved | 苏州跃动光标网络科技有限公司 | 苏ICP备2020058653号-1

 | 本站CDN由 数掘科技 提供

登录PHP中文网,和优秀的人一起学习!
全站2000+教程免费学