源代码安装PHP+GD


源代码安装PHP+gd,相关软件下载地址:

http://code.google.com/p/autosetup1/downloads/list

安装PHP:
PHP版本:php-5.3.8
root@server:/usr/local/src/lamp# tar -zxvf php-5.3.8.tar.gz

安装:GD库:

先安装libiconv
版本:ibiconv-1.14
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
root@server:/usr/local/src/lamp# tar -zxvf libiconv-1.14.tar.gz
root@server:/usr/local/src/lamp# cd libiconv-1.14/
root@server:/usr/local/src/lamp/libiconv-1.14# ./configure –prefix=/usr/local
root@server:/usr/local/src/lamp/libiconv-1.14# make
root@server:/usr/local/src/lamp/libiconv-1.14# make install

安装GD库:
版本:gd_2.0.35
root@server:/usr/local/src/lamp# cd gd-2.0.35/
root@server:/usr/local/src/lamp/gd_2.0.35#  ./configure –prefix=/usr/local –with-libiconv-prefix=/usr/local –with-png –with-freetype –with-jpeg
root@server:/usr/local/src/lamp/gd_2.0.35#  make
root@server:/usr/local/src/lamp/gd_2.0.35# make install

注意:gd库的官方下载地址安装一直失败:

https://bitbucket.org/pierrejoye/gd-libgd/downloads

主要表现在:编译正常,安装也正常,启动PHP也正常,但是在PHP中应用GD的验证码就是无法显示.

因此要到一个网友提供的地址下载就可以了:

源代码安装PHP+gd,相关软件下载地址:

http://code.google.com/p/autosetup1/downloads/list

安装PHP:
PHP版本:php-5.3.8
root@server:/usr/local/src/lamp/php-5.3.8# ./configure –prefix=/usr/local/php5 –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/apache2/bin/apxs –with-gd=/usr/local –with-zlib –with-gettext –with-zlib-dir –with-jpeg-dir –enable-mbstring –with-iconv-dir –with-pdo-mysql=/usr/local/mysql –enable-bcmath –with-freetype-dir

比较完整的php configure命令:

#./configure –prefix=/usr/local/php538 –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/apache2/bin/apxs –with-gd=/usr/local –with-zlib –with-gettext –with-zlib-dir –with-jpeg-dir –enable-mbstring –with-iconv-dir –with-pdo-mysql=/usr/local/mysql –enable-bcmath –with-freetype-dir=/usr/local/freetype –with-curl –with-openssl –with-tidy –enable-zip –enable-soap

root@server:/usr/local/src/lamp/php-5.3.8# make
root@server:/usr/local/src/lamp/php-5.3.8# make install

root@server:/usr/local/src/lamp/php-5.3.8# cp php.ini-development /usr/local/php5/lib/php.ini


阅读更多
文章标签: php server
个人分类: PHP+MYSQL
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭