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

http://www.enterprisedb.com/products-services-training/pgdownload

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

Now the binary file is ready to install

 

Capture02.PNG

To run the binary give necessary rights.

 

Capture03.PNG

 

Now you can start the binary installation.Capture04.PNG

 

Actually the other parts are simple ; just Next ;

Choose the Installation Directory

 

 

Capture06.PNG

 

The other step is

Choose the directory where the data will stay

 

Capture07.PNG

Enter password for the superuser (postgres)

Capture08.PNG

And choose a port number for the database;

Capture09.PNG

Choose locale

Capture10.PNG

And then installation starts.

 

Capture11.PNG

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

 

If you see all these programs . It is OK.

Capture12.PNG

 

 

START &STOP PostgreSQL

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$ . pg_env.sh

-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

Password:

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

es

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

+

|          |          |            |            | postgres=CTc/postgr

es

(3 rows)

Advertisements