Install Postgresql database and phpPgAdmin on Ubuntu 15.04 Server

Sponsored Link
PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video. It has native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others.

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

1

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

2

Login using postgres user

3

Once you logged in you can see similar to the following screen

4

Sponsored Link

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *