CSDN博客

img marcolu

RedHat下安装GD(支持GIF)

发表于2004/6/28 13:37:00  3796人阅读

需要安装的软件:
        php4.3.1+apache2.0.49+zlib-1.1.4+libpng-1.2.5+jpegsrc.v6b+gd-2.0.21gif+ZendOptimizer+freetype

1。安装zlib(./configure && make && make install)

2。安装jpegsrc(./configure && make && make install-lib && make install)

3。安装libpng(cp scripts/makefile.linux Makefile && make && make install-headers && make install)

4。安装gd(./configure --with-jpeg=/usr/local --with-png=/usr/local --with-freetype=/usr && make && make install)

5。安装apache(./configure --prefix=/usr/local/apache-php --share-modules=max && make && make install)

6。安装php(./configure --with-apxs2=/usr/local/apache-php/bin/apxs --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-gd=/usr/local --enable-trace-vars --with-zlib-dir=/usr/local --with-mysql=/usr/local/mysql && make && make install

7。安装ZendOptimizer(./install.sh)

错误记录:

1。 [root@dell4300 conf]# ../bin/apachectl start

[Tue Jun 01 16:06:57 2004] [error] VirtualHost 61.151.243.205:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs

答:在apache2.0.*上必须加端口号!否则默认为0

2。在页面上统计有问题。显示不出统计数值。

答:php.ini没有配好!register_globals = On

3。在页面中没有原先网站的开头!

答:在apache配置文件中需要下面两行:

AddType text/html .shtml

AddHandler server-parsed .shtml .html

4。原来用的是php-4.3.6,编译的时候出现报错:

/opt/download/php-4.3.6/ext/gd/gd.c:385: undefined reference to `gdFreeFontCache'

collect2: ld returned 1 exit status

make: *** [sapi/cli/php] Error 1

答:使用php-4.3.1问题消失!

参考文档:
      http://www.boutell.com/gd/manual2.0.26.html GD的文档,详细介绍了GD的各方面,首先推荐
        http://www.rime.com.au/gd/ 如果说上面的地址是告诉你怎么回事的话,那么这个地址就是你下载GD库的地方。因为官方下载的GD库是不带gif补丁的。为什么上面的文档已经说明!
        http://www.lslnet.com/linux/docs/linux-3366.htm
 参考了里面的示例,我认为写的比我好,不过我开始用他的方法并不成功,所以才会有我的这篇文章的诞生

0 0

相关博文

我的热门文章

img
取 消
img