How to install PHP @ Debian 5.0 i686
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
Configuration
debian:~/php-5.3.2# cp php.ini-production /usr/local/lib/php.ini debian:~/php-5.3.2# nano /usr/local/lib/php.ini short_open_tag = On debian:~/php-5.3.2# nano /usr/local/apache2/conf/httpd.conf AddType application/x-httpd-php .php LoadModule php5_module modules/libphp5.so DirectoryIndex index.php index.html debian:~/php-5.3.2# nano /usr/local/apache2/htdocs/index.php
Testing
*Check Version of PHP
debian:~# php -v PHP 5.3.2 (cli) (built: Mar 16 2010 10:50:06) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
*Restart Http server
debian:~# /usr/local/apache2/bin/apachectl stop debian:~# /usr/local/apache2/bin/apachectl start
*Browser Check for phpinfo
Open with your web browser to see php info we’ve created before
http://yourip/ or http://yourdomain/
References : http://www.wowtutorial.org/linux-servers/how-install-httpd-php-and-mysql-opensuse-111-x8664-333.html
Category: Linux | Tags: compile php, debian, debian 5.0, imap, Linux, php, php5 4 comments »
June 8th, 2010 at 10:25 pm
[...] PHP,Web Server and Database Server * PHP * Apache2 * [...]
July 15th, 2010 at 2:34 am
[...] Smstools 3 (penginstallan dan konfigurasi baca disini) – Apache2 – Linux Crontab – MySQL Server – PHP – Lynx (Console Web Browser) – Root [...]
July 22nd, 2010 at 3:59 pm
[...] MySQL * PHP * [...]
July 23rd, 2010 at 4:14 pm
[...] * PHP * Oracle Instant [...]