Search This Blog

Thursday, January 25, 2018

Postgres: Install Postgresql-server 9.2 on Centos 7.2


  • You search for the package you'll want to install
  • [root@toolz ~]# yum search postgres|grep server

  • To get more details:
  • [root@toolz ~]# yum info postgresql-server.x86_64

  • Then install it:
  • [root@toolz ~]# yum install postgresql-server.x86_64

  • Setup the postgres password:
  • [root@toolz ~]# passwd postgres

  • Init the postgres first DB
  • [root@toolz ~]# sudo postgresql-setup initdb

  • Setup your connections:
  • [root@toolz ~]# sudo vi /var/lib/pgsql/data/pg_hba.conf

  • Start postgresql service
  • [root@toolz ~]# systemctl start postgresql

  • And finaly enable it to start automatically at next boot
  • [root@toolz ~]# systemctl enable postgresql


What to do next:
  • pg_hba.conf
  • create databases and users
  • postgresql-server logging

No comments:

Post a Comment