PostgreSQL, often basically Postgres, is an object-relational database management method (ORDBMS) obtainable for lots of platforms including Debian , FreeBSD, Solaris, MS Windows & Mac OS X.
It is released under the PostgreSQL License, which is an MIT-style license, & is thus free & open source application. PostgreSQL is developed by the PostgreSQL Global Development Group, consisting of a handful of community volunteers employed & supervised by companies such as Red Hat.
Step1. PostgreSQL Installation:
apt-get install postgresql
Step2. PostgreSQL Configuration:
The main configuration file is located in : /etc/postgresql/8.4/main/postgresql.conf
Fist open the configuration file and make the following changes:
vim /etc/postgresql/8.4/main/postgresql.conf
and remove the “#” form line:
#password_encryption = on
Optional you can make the PostgreSQL to listen on any ip address:
#listen_addresses = ‘localhost’
By removing the “#” and replace localhost with “*” you will make PostgreSQL to listen on all ip addresses.
Step3. Create a SuperUser and Password for PostgreSQL (with which we can create
other users and databases)
root@testing:/# su – postgres
postgres@testing:~$ createuser -sdrP master
Enter password for new role:
Enter it again:
postgres@testing:~$
Step4. Install phpPgAdmin
apt-get install phppgadmin
If you need to acces phppgadmin from another computer:
nano /etc/apache2/conf.d/phppgadmin
and make theese modifications:
order deny,allow
deny from all
#allow from 127.0.0.0/255.0.0.0 ::1/128
allow from all
Restart the apache2 server and PostgreSQL server:
/etc/init.d/apache2 restart
/etc/init.d/postgresql restart
Restarting PostgreSQL 8.4 database server: main.
Now you can acces the http://<ip>/phppgadmin and create/edit databases and users.
Enjoy.
In my case there was no file /etc/postgresql/8.4/main/postgresql.conf
However, I did nano /etc/apache2/conf-enabled/phppgadmin.conf and there commented the line Require local
after that, normally did the restart for postgresql and apache2. Idk whether it is safe, but it sure worked.