Excerpt |
---|
PostgreSQL is a part of default CentOS repositories, so yum can be used to install it. |
Followings are the steps to install PostgreSQL on CentOS 7.
Install PostgeSQL server
...
on command line
Code Block |
---|
sudo yum install -y postgresql-server postgresql-contrib |
Initialize the Database
Code Block |
---|
sudo postgresql-setup initdb |
Start the Database
Code Block |
---|
sudo systemctl start postgresql |
Enable PostgreSQL
Code Block |
---|
sudo systemctl enable postgresql |
...
Modify configuration by sudo vi /var/lib/pgsql/data/pg_hba.conf - you need to uncomment disable all the host files and add below linesettings by adding # and insert addtional line below
Code Block |
---|
host all all 0.0.0.0/0 password |
...