How to install, configure Apache, Php, Postgresql on Linux.
Summary - Installing configuring Apache, Php and Postgres.
Published - Apr 02/2006
Last Updated - Aug 02/2009
Author - Sumedh
Note - This tutorial assumes that you know how to compile and install a program from its source.
Download and install Postgres.
1) Switch to the root user.
2) Download Postgresql source from http://www.postgresql.org/download
3) Extract Postgresql to any folder of your choice.
./configure
make
make install
make
make install
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
5) Download Apache source from http://httpd.apache.org
6) Extract Apache to any folder of your choice.
7) Configure and install Apache.
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite
make
make install
make
make install
8) Download Php source from http://www.php.net/downloads.php
9) Extract Php to any folder of your choice.
10) Configure and install Php.
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-pgsql
make
make install
make install
11) Copy php.ini or php.ini-dist from the folder where you extracted php to /usr/local/lib
12) Go to /usr/local/lib folder and open the php.ini-dist file in any simple text editor like emacs.
13) Find 'extension=php_pgsql.dll' in the file and remove the ' ; ' before that line.
Page 1 2
Copyright © 2002 - 07 Sumedh K
