Problem scenario: You have a Linux Centos 7.3 server. You want to get Postgresql to work on it. What do you do?
Solution
To get Postgresql working on a CentOS 7.3 server, do the following four commands as the root user:
yum -y install postgresql-server postgresql-contrib
postgresql-setup initdb
systemctl start postgresql
systemctl enable postgresql
# To issue SQL commands, run these two commands:
sudo -i -u postgres
psql
# To exit the Postgres command prompt, type this followed by enter:
\q