Installing PostgresQL on Linux from yum repository

Razi Abuzar's picture

Step1: add user as below:


adduser postgres

Step2: Create Directory

mkdir –p /the/directory/for/data

Step3: yum install postgres*

Step4: initdb –D / the/directory/for/data

Step 5: Start service

Pg_ctl / the/directory/for/data logfile start

Step6: instead of starting like this we can also create a script in init.d file of linux to start this as a linux service.