Interactively Installation of PostgreSQL on Oracle Linux 7

At this writing; I will show how you can install PostgreSQL interactively on Oracle Linux 7. The same procedure applies to Red Hat Linux and other linux versions as well.

First you need to download PostgreSQL binary;  you can connect to

web site to download and we choose Linux x86-64.Capture01.PNG

Now the binary file is ready to install



To run the binary give necessary rights.




Now you can start the binary installation.Capture04.PNG


Actually the other parts are simple ; just Next ;

Choose the Installation Directory





The other step is

Choose the directory where the data will stay



Enter password for the superuser (postgres)


And choose a port number for the database;


Choose locale


And then installation starts.



Installation is finished you can check the programs are installed correctly.


If you see all these programs . It is OK.





At this configuration we can start , stop and check the status of the database like that;

[root@localhost ~]# su – postgres

Last login: Sat Apr 23 18:51:45 EEST 2016 on pts/1

-bash-4.2$ .

-bash-4.2$ pg_ctl status

pg_ctl: server is running (PID: 4080)

/opt/PostgreSQL/9.5/bin/postgres “-D” “/opt/PostgreSQL/9.5/data”

-bash-4.2$ pg_ctl stop

waiting for server to shut down…. done

server stopped

-bash-4.2$ pg_ctl start

server starting

-bash-4.2$ 2016-04-23 18:56:38 EEST LOG:  redirecting log output to logging collector process

2016-04-23 18:56:38 EEST HINT:  Future log output will appear in directory “pg_log”.


-bash-4.2$ psql


psql.bin (9.5.2)

Type “help” for help.

postgres=# \l

List of databases

Name    |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges



postgres  | postgres | UTF8     | en_GB.utf8 | en_GB.utf8 |

template0 | postgres | UTF8     | en_GB.utf8 | en_GB.utf8 | =c/postgres


|          |          |            |            | postgres=CTc/postgr


template1 | postgres | UTF8     | en_GB.utf8 | en_GB.utf8 | =c/postgres


|          |          |            |            | postgres=CTc/postgr


(3 rows)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s