Linux under Php+gd2+freetype+jpeg+png+zlib compilation installation

Source: Internet
Author: User
Tags fpm

Event Origin: Discuz Background to open the Chinese code hint said does not support FreeType, but FreeType seems to need GD2 call to take effect.

So the installation of GD2, installation of GD2 by the time the installation of Jpeg,png,zlib

The required installation package has been placed in the Baidu cloud disk, download link http://pan.baidu.com/share/link?shareid=1837459297&uk=1778705955

The next step is the configuration steps:

1, installation Zlib

Tar XF zlib-1.2.7.tar.gz

CD zlib-1.2.7./configure--prefix=/usr/local/zlibmakemake install 2, installation Jpegtar XF JPEGSRC.V9A.TAR.GZCD jpeg-9a./ Configure--prefix=/usr/local/jpeg--enable-shared--enable-staticmakemake install 3, installation Libpngtar XF LIBPNG-1.6.12.TAR.GZCD libpng-1.6.12./configure--prefix=/usr/local/pngmakemake Install 4, installing Freetypetar XF FREETYPE-2.5.3.TAR.GZCD freetype-2.5.3./configure--prefix=/usr/local/freetypemakemake Install 5, installing Gd2tar XF LIBGD-2.1.0.GZCD libgd-2.1.0./configure--prefix=/usr/local/gd2--with-jpeg=/usr/local/jpeg/--with-png=/usr/local /png/--with-zlib=/usr/local/zlib/--with-freetype=/usr/local/freetype/
Makemake Install (note, the version must be >=2.1.0 here, otherwise with the php-5.6.0 will be error, may be old version of PHP will not error) 6, the integration of PHP GD extension to PHP originally wanted in the [PHP directory]/ext/ GD use phpize extension GD module, but prompt no config.m4 file so can only recompile php uninstall all PHP-related packages: Rpm-qa|grep PHP
Use RPM-E to add a package name
RPM-E php-4.3.9-3.15 recompile Php:tar XF php-5.6.0.tar.gzcd php-5.6.0./configure--prefix=/usr/local/php-5.6.0-- With-config-file-path=/usr/local/php-5.6.0/etc--WITH-CONFIG-FILE-SCAN-DIR=/USR/LOCAL/PHP-5.6.0/ETC/CONF.D-- ENABLE-FPM--with-pear--with-curl--with-gd=/usr/local/gd2--with-jpeg-dir=/usr/local/jpeg--with-png-dir=/usr/ Local/png--with-freetype-dir=/usr/local/freetype--with-zlib-dir=/usr/local/zlib--with-iconv--with-mcrypt-- With-mhash--with-zlib--with-xmlrpc--with-xsl--with-openssl--with-mysql--with-mysqli--with-pdo-mysql--with-bz2- -with-gettext--with-xpm-dir=/usr/lib64/make && Make install Finally, restart PHP-FPM to overload PHP:PHP-FPM shutdown:
Kill-int ' Cat/usr/local/php-5.6.0/var/run/php-fpm.pid '
PHP-FPM Restart:
KILL-USR2 ' cat/usr/local/php-5.6.0/var/run/php-fpm.pid ', refresh phpinfo, see support related modules is successful.

Linux under Php+gd2+freetype+jpeg+png+zlib compilation installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.