Accueil‎ > ‎

Tips on Postgres Installation

posted 9 Nov 2018, 05:45 by Christophe Noël
Some tips for installing Postgres 10:

Install:
sudo rpm -Uvh https://yum.postgresql.org/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
sudo yum install postgresql10-server postgresql10
sudo /usr/pgsql-10/bin/postgresql-10-setup initdb
sudo systemctl start postgresql-10.service
sudo systemctl enable postgresql-10.service

Stop/restart:
service postgresql-10 restart

Enable md5 authentication (password):
1. vi /var/lib/pgsql/10/data/pg_hba.conf (adapt the path)
2. set md5 for authentication methods
3.restart postgres

Create new user:
createuser -P -e gepadmin

Create new DB: 
createdb -e -O gepadmin wps

Test new DB connection:
psql -U gepadmin -W -d wps

Comments