Source code installation PHP+GD, related software download address:
Http://code.google.com/p/autosetup1/downloads/list
Install PHP:
PHP Version: php-5.3.8
root@server:/usr/local/src/lamp# TAR-ZXVF php-5.3.8.tar.gz
Installation: GD Library:
Install Libiconv First
Version: 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
Install the GD library:
Version: 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
Note: The installation of the GD Library's official download address has failed:
Https://bitbucket.org/pierrejoye/gd-libgd/downloads
Mainly in: Compile normal, installation is also normal, starting PHP is also normal, but the application of GD in PHP verification code is unable to display.
So to a user to provide the address of the download can be:
Source code installation PHP+GD, related software download address:
Http://code.google.com/p/autosetup1/downloads/list
Install PHP:
PHP Version: 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
The more complete PHP Configure command:
#./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