Build Zabbix when encountered with the requirements of PHP testing, found no support for GD, recorded ...
GD Library is a php processing graphics extension Library, it provides a series of images used to process the API, using the GD library can handle the picture, or create pictures, you can also add watermarks to the picture.
1, installation zlib, the general system comes with the installation, you can use the following command to view:
Rpm-qa | grep zlib
2, install libpng
cd/tmp
wget "https://jaist.dl.sourceforge.net/project/libpng/libpng16/1.6.32/ Libpng-1.6.32.tar.xz "
xz-d libpng-1.6.32.tar.xz
Tar XF libpng-1.6.32.tar
CD libpng-1.6.32
./configure
Make
Make install
installation directory is:/usr/local/include
3, install FreeType
cd/tmp
wget "https:// jaist.dl.sourceforge.net/project/freetype/freetype2/2.8.1/freetype-2.8.1.tar.bz2 "
TAR-JXVF FREETYPE-2.8.1.TAR.BZ2
CD freetype-2.8.1
./configure
Make
Make install
Install directory is:/usr/local/include
4, install JPEG
cd/tmp
wget "http://jpegclub.org/support/files/jpegsrc.v6b2.tar.gz"
Tar zxf jpegsrc.v6b2.tar.gz
CD jpeg-6b2/
./configure--enable-shared
Make
Make test
make install
The installation directory is: Usr/local/include
5, install GD
cd/tmp
https://bitbucket.org/libgd/gd-libgd/downloads/ (official website)
Tar XF Libgd-2.1.1.tar
CD libgd-2.1.1/
./configure--with-png--with-freetype--with-jpeg
make
Make install
The installation directory is: Usr/local/include
6, installation of PH
Cd/tmp
wget HTTP://CN2.PHP.NET/DISTRIBUTIONS/PHP-5.6.0.TAR.XZ
Xz-d PHP-5.6.0.TAR.XZ
Tar XF Php-5.6.0.tar
CD php-5.6.0/
./configure--prefix=/usr/local/webserver/php--with-config-file-path=/usr/local/webserver/php/etc--ENABLE-FPM-- With-fpm-user=www--with-fpm-group=www--with-mysql=mysqlnd--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd-- Enable-sockets--enable-bcmath--enable-mbstring--with-gd--with-zlib--with-png-dir=/usr/local/include/libpng16/- -with-jpeg-dir=/usr/local/include--with-freetype-dir=/usr/local/include/freetype2/freetype
Make
Make install
cp/tmp/php-5.6.0/sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
chmod +x/etc/init.d/php-fpm
Cp/tmp/php-5.6.0/php.ini-development/usr/local/webserver/php/etc/php.ini
CD/USR/LOCAL/WEBSERVER/PHP/ETC && CP Php-fpm.conf.default php-fpm.conf
Vim/usr/local/webserver/php-5.6/etc/php.ini
Date.timezone = Asia/shanghai
Vim ~/.bash_profile
Path= $PATH: $HOME/bin:/usr/local/webserver/php-5.6/bin
SOURCE ~/.bash_profile
/ETC/INIT.D/PHP-FPM start
This article is from the "10620401" blog, please be sure to keep this source http://10630401.blog.51cto.com/10620401/1976886
Configuring PHP support for the GD library