Third, the installation of PHP
First install some of the packages that PHP requires.
1, installation LIBXML2:
Apt-get Install LIBXML2 Libxml2-dev
TAR-ZXVF zlib-1.2.3.tar.gz
CD zlib-1.2.3
./configure–prefix=/usr/local/zlib
Make
Make install
2. Install JPEG:
TAR-ZXVF jpegsrc.v6b.tar.gz
CD jpeg-6b
Mkdir/usr/local/jpeg
Mkdir/usr/local/jpeg/bin
Mkdir/usr/local/jpeg/lib
Mkdir/usr/local/jpeg/include
Mkdir/usr/local/jpeg/man
Mkdir/usr/local/jpeg/man/man1
./configure–prefix=/usr/local/jpeg–enable-shared–enable-static
Make
Make install
3, installation libpng:
TAR-ZXVF libpng-1.2.16.tar.gz
CD libpng-1.2.16
./configure–prefix=/usr/local/libpng
Make
Make install
4, Installation FreeType:
TAR-ZXVF freetype-2.3.3.tar.gz
CD freetype-2.3.3
./configure–prefix=/usr/local/freetype
Make
Make install
5, install GD:
TAR-ZXVF gd-2.0.33.tar.gz
CD gd-2.0.33
./configure–prefix=/usr/local/gd–with-jpeg=/usr/local/jpeg–with-freetype=/usr/local/freetype–with-png– With-zlib
Make
Make install
6, Installation Curl:
TAR-ZXVF curl-7.16.1.tar.gz
CD curl-7.16.1
Mkdir-p/usr/local/curl
./configure–prefix=/usr/local/curl–with-ssl
Make
Make install
7, Installation Libiconv:
TAR-ZXVF libiconv-1.11.tar.gz
CD libiconv-1.11
./configure–prefix=/usr/local/iconv
Make
Make install
8, the official installation of PHP:
Parameters are more, can be installed as required, in general, these are enough.
TAR-ZXVF php-5.2.5.tar.gz
CD php-5.2.5
./configure–prefix=/usr/local/php–with-apxs2=/usr/local/apache/bin/apxs–with-config-file-path=/usr/local/ Apache/conf–enable-magic-quotes–with-openssl=/usr/local/ssl–with-zlib=/usr/local/zlib–with-zlib-dir=/usr/local /zlib–with-curl=/usr/local/curl–enable-ftp–with