How to install the GD Library in php5
- Cd libpng-1.2.40
- Mv scripts/makefile. linux./Makefile # Make sure to use Makefile under script instead of using./configure
Generation:
- Make
- Make install
2, download freetype library, many GD functions need this library support http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.5.tar.gz After decompression, go to the directory:
- Cd freetype-2.3.5
- ./Configure -- prefix =/usr/local/freetype # specify the freetype installation directory for php compilation
- Make
- Make install
3. download GD Library select the appropriate version download from the http://www.libgd.org After decompression, go to the directory:
- ./Configure -- prefix =/usr/local/gd2 -- with-png -- with-freetype # you do not need to specify the freetype Directory. you must specify the installation path of the gd Library.
- Make
- Make install
4. compile PHP Go to the php source code 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 the apache service to install the PHP5 GD Library. |