You should have some knowledge of the GD library, which is an important library for PHP to manipulate graphics and text. So today we're going to give you a concrete explanation of how
PHP5 installation of GD library 1. Download the libpng library, you need to support at least one file type, if other types are required to download separately
Http://nchc.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.40/libpng-1.2.40.tar.gz
After decompression, go to Folder
CD libpng-1.2.40
MV Scripts/makefile.linux./makefile #这里一定要使用script下的Makefile, do not pass./configure
Generated
Make
Make install
PHP5 Installing GD library 2. Download the FreeType library, many of the GD functions require support for this library
Http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.5.tar.gz
3. After decompression
CD freetype-2.3.5
The./configure--prefix=/usr/local/freetype #这里指定freetype的安装目录 so that PHP is compiled with
Make
Make install
PHP5 Installing GD library 4. Download GD Library
Choose the right version to download from http://www.libgd.org
Enter directory after decompression
./configure--prefix=/usr/local/gd2--with-png--with-freetype #这里不需要制定freetype目录,
However, the installation path of the GD library needs to be established
Make
Make install
PHP5 Installing GD Library 5. Compiling PHP
Enter the PHP source directory
./configure--WITH-APXS2=/USR/LOCAL/APACHE2/BIN/APXS--with-mysql--without-sqlite--
Without-pdo-sqlite--WITH-GD=/USR/LOCAL/GD2--with-freetype-dir=/usr/local/freetype/
Make
Make install
Restart Apache to complete the PHP5 installation of the GD library.
http://www.bkjia.com/PHPjc/446422.html www.bkjia.com true http://www.bkjia.com/PHPjc/446422.html techarticle you should have some knowledge of the GD library, which is an important library for PHP to manipulate graphics and text. So today we'll explain how to do PHP5 installation of GD library 1. Download libpng library, at least ...