1) Add rpm image of postgress in to rpm repository with the command
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
2) Type in yum install postgresql95-server
If the above command throws 404 exception, edit the base url in the below file to a working url
vim /etc/yum.repos.d/pgdg-95-redhat.repo
baseurl=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6.6-$basearch
3) Initialize the database with the command: service postgresql-9.5 initdb
4) Start postgress with the command: service postgresql-9.5 start
At this point, if you type su - postgres you will get a bash console, in there type in psql
Thats it, you are good to go.
No comments:
Post a Comment