SumedhSumedhSumedh
Sumedh
Sumedh
SumedhSumedhSumedh
Home                Articles                Downloads                Images                 Beta                 Contact

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.





Configure Apache.

14) Open the httpd.conf file in /usr/local/apache/conf folder in any simple text editor.
15) Make sure the following line is there in the LoadModule list, if it is not there add it.
LoadModule php5_module modules/libphp5.so
16) Find the AddType application section and add or uncomment the following lines.
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
17) In the User/Group list, edit or add these lines.
User postgres
Group daemon
Test Apache and Php.

18) Start Apache, you will need sudo access.
/usr/local/apache/bin/apachectl start
19) Go to /usr/local/apache/htdocs. This is the default folder where Apache puts it html files.
20) Create a new php file called index.php
21) Copy paste the following lines in that file.
<?php
  phpinfo();
?>
22) After saving it open http://localhost/index.php in Firefox
      Dont tell me that you dont use firefox :)

      If you see a page similar to the one given below then you have installed php correctly.
      Scroll down till you see pgsql. Congrats you have configured php with postgres.

       Php options              pgsql options
Click on the thumbnail to get a bigger image


      Note - If you cannot see the php information page, try restarting apache.



Page    1   2


Copyright © 2002 - 07 Sumedh K