⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1051.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
                          <TR>
                            <TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif" 
                          height=30></TD></TR></TBODY></TABLE>
                        <TABLE cellSpacing=0 cellPadding=3 width="95%" 
                        align=center border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                      <TD vAlign=top> 
<p><FONT class=normalfont><B><font color=blue>linux上GD库的安装</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br>  为了安装方便,我自己写了一分GD安装的过程,现在发表出来.希望朋友们多提意见,谢谢! 原来GD不支持WBMP,现在扩充GD支持WBMP.<br>
<br>
问题:<br>
<br>
  安装RedHat 7.2 后,进行PHP编程,发现只能处理GIF图像,不能处理JPEG图像。<br>
<br>
  后来知道PHP处理图像,使用了GD库,而GD库开始时是支持GIF的,但由于GIF使用了有版权争议的LZW算法,会引起法律问题,于是从 GD-1.6开始,GD库不再支持GIF,改为支持更好的,无版权争议的PNG。而我现在希望同时支持GIF,PNG和JPEG。由底向上的顺序介绍,即 Jpeg-&gt;ttf-&gt;zlib-&gt;png-&gt;GD-&gt;PHP-&gt;Apache。<br>
<br>
1.Jpeg6b的安装和配置<br>
<br>
  Jpeg的主要文件有jpeglib.h, libjpeg.a, libjpeg.so等。首先检查系统中安装了没有,到/usr/include目录下看有无jpeglib.h,到/usr/lib目录下看有无 libjpeg.a和libjpeg.so。我的系统中没有,因而要安装。<br>
<br>
  获取Jpeg源码的地址为:<br>
<br>
  ftp://ftp.uu.net/graphics/jpeg/<br>
  取得的文件为jpegsrc.v6b.tar.gz,放于/usr/src目录下。<br>
<br>
  进入/usr/src目录中,开始安装过程。进入/usr/src:<br>
<br>
  cd /usr/src<br>
  解开压缩文件:<br>
<br>
  tar xzvf jpegsrc.v6b.tar.gz<br>
  命令完成后多了一个子目录jpeg-6b,Jpeg的源码文件就在其中。进入该子目录:<br>
<br>
  cd jpeg-6b<br>
  该目录中的install.doc文件详细介绍了如何安装Jpeg,照章行事即可。配置生成Makefile文件:<br>
<br>
  ./configure<br>
  命令完成后该目录下多了个Makefile文件。Makefile文件是许多软件编译、安装的配置和过程控制文件,十分重要,应该学会看懂它的内容。开始编译:<br>
<br>
  make<br>
  命令完成后该目录下多了许多文件,其中重要的是libjpeg.a和libjpeg.so。安装:<br>
<br>
  make install<br>
  命令完成后,jpeglib.h被拷到/usr/include目录下,libjpeg.a和libjpeg.so被拷到/usr/local/lib目录下<br>
<br>
2. ttf 的安装和配置<br>
<br>
   http://www.freetype.org<br>
   freetype-1.3.1.tar.gz  <br>
   tar -xzvf  freetype-1.3.1.tar.gz  <br>
  ./configure<br>
  命令完成后该目录下多了个Makefile文件。Makefile文件是许多软件编译、安装的配置和过程控制文件,十分重要,应该学会看懂它的内容。开始编译:<br>
<br>
  make<br>
  make install<br>
  编译gd 的时候有error don't found the freetype.h 所以<br>
<br>
  cp  /usr/local/include/freetype/*  /usr/local/include/<br>
3, zlib 安装:<br>
<br>
  Becaust the note, you must install the zlib first!  <br>
  Before installing libpng, you must first install zlib.  zlib<br>
  can usually be found wherever you got libpng.  zlib can be<br>
  placed in another directory, at the same level as libpng.<br>
  Note that your system might already have a preinstalled<br>
  zlib, but you will still need to have access to the<br>
  zlib.h and zconf.h include files that correspond to the<br>
  version of zlib that's installed.<br>
  http://www.gzip.org/zlib/<br>
  ftp://ftp.uu.net/graphics/png/src/zlib-1.1.3.tar.gz<br>
  ./configure<br>
  make <br>
  make install <br>
4. libpng 安装:<br>
<br>
  Read INSTALL  <br>
  http://www.libpng.org/pub/png/<br>
  libpng-1.2.0.tar.gz<br>
  UNIX example:    cp scripts/makefile.std makefile<br>
  make<br>
  make install <br>
5.GD-1.8.3的安装和配置<br>
<br>
  GD的主要文件有gd.h, libgd.a等。获取GD源码的地址为:http://www.boutell.com/gd/<br>
<br>
  取得的文件为gd-1.8.3.tar.gz,放于/usr/src目录下。已知道该版本的GD不支持GIF,但想来象我一样希望GD同时支持 GIF和JPEG的人不少,于是有人做了个补丁,把对GIF的支持加回去了。看起来这是个英国人吧,他的Email地址为 adam@elysium.ltd.uk。获取补丁源码的地址为:http://www.webofsin.com/gd-1.8.3- gif.patch 取得的文件为gd-1.8.3-gif.patch,放于/usr/src目录下。进入/usr/src:<br>
<br>
  cd /usr/src<br>
  解开压缩文件:<br>
<br>
  tar xzvf gd-1.8.3.tar.gz<br>
  命令完成后多了一个子目录gd-1.8.3,GD的源码文件就在其中。给源码打补丁:<br>
<br>
  patch -p0 &lt; code&gt;<br>
  命令完成后gd-1.8.3子目录下多了个gd_gif.c文件,而文件gd.h和Makefile也被作了相应修改。进入该子目录:<br>
<br>
  cd gd-1.8.3<br>
  缺省情况下,GD库编译时并不加入JPEG支持,得修改Makefile文件。修改Makefile文件,使得:<br>
<br>
  CFLAGS=-O -DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF<br>
  LIBS=-lm -lgd -lpng -lz -ljpeg -lttf -lXpm -lX11<br>
  此后,编译并安装: <br>
<br>
  make<br>
  make install<br>
  命令完成后,gd.h被拷到/usr/local/include目录下,libgd.a被拷到/usr/local/lib目录下。<br>
<br>
  php apache 以SO方式安装: <br>
<br>
6、 php-4.0.6的安装和配置<br>
<br>
  PHP的主要文件有libphp4.a, libphp4.so等。获取PHP源码的地址为:http://php.net<br>
<br>
  取得的文件为php-4.0.6.tar.gz,放于/usr/src目录下。<br>
<br>
  进入/usr/src目录并解压文件:<br>
<br>
  cd /usr/src<br>
  tar xzvf php-4.0.6.tar.gz<br>
  命令完成后多了一个子目录php-4.0.6,PHP的源码文件就在其中。进入该子目录:<br>
<br>
  cd php-4.0.6<br>
  php<br>
  ./configure <br>
    --with-apache=/usr/local/apache_1.3.26 <br>
    --enable-track-vars <br>
    --enable-debug <br>
    --enable-url-includes <br>
    --enable-sockets <br>
    --with-gd=/usr/local <br>
    --enable-gd-native-ttf <br>
    --with-ttf=/usr/local <br>
    --with-jpeg-dir=/usr/local <br>
    --with-zlib-dir=/usr/local <br>
    --with-png-dir=/usr/local<br>
     <br>
<br>
  编译并安装:<br>
<br>
  make<br>
  make install<br>
  命令完成后,libphp4.so被拷到/usr/lib/apache目录下。<br>
<br>
7、apache_1.3.12的安装和配置<br>
<br>
  ./configure <br>
    --prefix=/usr/local/apache <br>
    --activate-module=src/modules/php4/libphp4.a <br>
    --enable-module=so <br>
    --enable-module=negotiation <br>
    --enable-module=status <br>
    --enable-module=include <br>
    --enable-module=autoindex <br>
    --enable-module=cgi <br>
    --enable-module=asis <br>
    --enable-module=imap <br>
    --enable-module=actions <br>
    --enable-module=userdir <br>
    --enable-module=alias <br>
    --enable-module=setenvif<br>
  make <br>
  make install<br>
    易捷网发表的文档,均来自于相关网站公开发表的内容,如果您认为本站发表的文章侵犯了您的著作权,请及时与本站取得联系,本站将在第一时间内删除。 
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -