Install Postgresql database and phpPgAdmin on Ubuntu 15.04 Server
Sponsored Link
phpPgAdmin is a web-based administration tool for PostgreSQL. It is perfect for PostgreSQL DBAs, newbies, and hosting services.
Install Postgresql database and phpPgAdmin on Ubuntu 15.04 Server
Open the terminal and run the following command
sudo apt-get install postgresql postgresql-contrib phppgadmin
The above command will install all the required packages
Loggin in to Postgresql database
By default Postgresql creates a user called postgres for authentication so you can login using the following commands
sudo su
su -- postgres
The above command changes the login prompt to $ and you can access postgresql using the following command
psql
Output looks as follows
psql (9.4.4)
Type "help" for help.postgres=#
Reset the postgre using password using the following command
postgres=# \password postgres
Enter new password:
Enter it again:
Configure Apache2 for phpPgAdmin
By default phpPgAdmin only allowed from local so you need to change to allow from all.Edit the /etc/apache2/conf-available/phppgadmin.conf file
sudo vi /etc/apache2/conf-available/phppgadmin.conf
Do the following changes
Comment out the Require local
Add the allow from all
Save and exit the file
PhpPgAdmin Security
If extra login security is true, then logins via phpPgAdmin with no password or certain usernames (pgsql, postgres, root, administrator) will be denied.
Now change the following option
$conf[‘extra_login_security'] = true;
to
$conf[‘extra_login_security'] = false;
Save and exit the file
Now you need to relaod apache2 and postgresql services using the following command
sudo service apache2 restart
sudo service postgresql restart
Loggin in to PostgreSQL GUI
You use the URL to http://serverip/phppgadmin/ to get the default login screen
Login using postgres user
Once you logged in you can see similar to the following screen