How to install PHP @ Debian 5.0 i686
March 17th, 2010 — 3:15am
Requirement
*GNU C Compiler and other small packages required
debian:~# apt-get install gcc build-essential automake autoconf autoreconf libncurses5-dev debian:~# apt-get install libpam-doc libpam-modules libpam-runtime libpam0g libpam0g-dev
*OpenSSL
*Apache2 Web Server
*Mysql
Package
debian:~# wget http://zlib.net/zlib-1.2.4.tar.gz debian:~# wget http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.12.tar.gz debian:~# wget http://www.ijg.org/files/jpegsrc.v8a.tar.gz debian:~# wget http://curl.haxx.se/download/curl-7.20.0.tar.gz debian:~# wget ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz debian:~# wget http://www.libgd.org/releases/gd-2.0.35.tar.gz debian:~# wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.43.tar.gz debian:~# wget http://mirror.unej.ac.id/cpan/authors/id/T/TI/TIMB/DBI-1.609.tar.gz debian:~# wget ftp://ftp.cac.washington.edu/imap/imap-2007e.tar.gz debian:~# wget http://id.php.net/get/php-5.3.2.tar.gz/from/us.php.net/mirror
Installation
## Zlib ## debian:~# tar -zxvf zlib-1.2.4.tar.gz debian:~# cd zlib-1.2.4 debian:~/zlib-1.2.4# CFLAGS="-O3 -fPIC" ./configure --shared && make && make install ## Freetype ## debian:~# tar -zxvf freetype-2.3.12.tar.gz debian:~# cd freetype-2.3.12 debian:~/freetype-2.3.12#./configure && make && make install ## JPEG ## debian:~# tar -zxvf jpegsrc.v8a.tar.gz debian:~# cd jpeg-8a debian:~/jpeg-8a# ./configure --prefix=/usr/local --enable-shared debian:~/jpeg-8a# make && make install ## LibPNG ## debian:~# tar -zxvf libpng-1.2.43.tar.gz debian:~# cd libpng-1.2.43 debian:~/libpng-1.2.43# ./configure && make && make install ## Curl ## debian:~# tar -zxvf curl-7.20.0.tar.gz debian:~# cd curl-7.20.0 debian:~/curl-7.20.0#./configure && make && make install ## LibXML ## debian:~# tar -zxvf libxml2-2.7.7.tar.gz debian:~# cd libxml2-2.7.7 debian:~/libxml2-2.7.7# ./configure && make && make install ## GD ## debian:~# tar -zxvf gd-2.0.35.tar.gz debian:~# cd gd-2.0.35 debian:~/gd-2.0.35# ./configure --with-freetype=/usr/local \ --with-jpeg=/usr/local/lib \ --with-png=/usr/local/lib debian:~/gd-2.0.35# aclocal debian:~/gd-2.0.35# make && make install ## ## DBI ## debian:~/# tar -zxvf DBI-1.609.tar.gz debian:~/DBI-1.609# cd DBI-1.609 debian:~/DBI-1.609# perl Makefile.PL debian:~/DBI-1.609# make && make install ## IMAP2007e ## debian:~/# tar -zxvf imap-2007e.tar.gz debian:~/# mv imap-2007e/ /usr/local/ debian:~/# cd /usr/local/imap-2007e/ debian:~/imap-2007e# make slx EXTRACFLAGS="-fPIC" ## PHP ## debian:~/# tar -zxvf php-5.3.2.tar.gz debian:~/# cd php-5.3.2/ debian:~/php-5.3.2# ./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=/usr/local/mysql \ --with-gd=/usr/local \ --with-jpeg-dir=/usr/local/lib \ --with-zlib-dir=/usr/local \ --enable-ftp \ --with-png-dir=/usr/local/lib \ --with-freetype-dir=/usr/local \ --with-curl=/usr/local \ --with-imap=/usr/local/imap-2007e \ --with-imap-ssl=/usr/local/ssl \ --enable-mbstring debian:~/php-5.3.2# make && make install