Installation
Install PostgreSQL:
sudo apt-get install postgresql
Install GUI Administration application:
sudo apt-get install pgadmin3
Install PHP based Web Administration site (like phpMyAdmin for MySQL database):
sudo apt-get install phppgadmin
Configuration
Configure so that you can access via localhost:gksudo gedit /etc/postgresql/9.1/main/postgresql.conf
It witll open the file for editing, Add following line at the end of the file:listen_addresses = 'localhost'Save and close the file. Open another file for editing:gksuso gedit /etc/postgresql/9.1/main/pg_hba.confReplace “local all all ident sameuser” with:local all all md5Change Password for root user
In PostGRE, root user is “postgres” which by default, does not have any password. Enter following line in terminal to set a password for it:sudo -u postgres psql template1 ALTER USER postgres with encrypted password 'your_password'; \qCreate a new User & a new Database
sudo -u postgres createuser -d -R -P new_username sudo -u postgres createdb -O new_username new_database_nameThis will create a new user, with username “new_username” and create a new database“new_database_name” and set “new_username” it’s owner.Configure phpPgAdmin
I assume you already installed phpPgAdmin by:sudo apt-get install phppgadminThen, configure Apache:gksudo gedit /etc/apache2/apache2.confAdd following line at the end of the file:Include /etc/phppgadmin/apache.confsudo /etc/init.d/apache2 restart sudo /etc/init.d/postgresql-9.1 restartAccess phpPgAdmin
type http://localhost/phppgadmin in your browser & log in by the username you just created (new_username)