The installation of PostgreSQL 9.6 needs to be done before installing Newired Portal
Below are listed all the commands to execute on the terminal of the server.
- Add the PostgreSQL 9.6 Repository
yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm -y
- Install PostgreSQL 9.6
yum install postgresql96 postgresql96-server postgresql96-contrib postgresql96-libs -y
- Init the PostgreSQL 9.6 service
/usr/pgsql-9.6/bin/postgresql96-setup initdb
- Enable the PostgreSQL 9.6 service
systemctl enable postgresql-9.6.service
- Start the PostgreSQL 9.6 service
systemctl start postgresql-9.6.service
- Set the password for superuser postgres
echo "ALTER USER postgres WITH PASSWORD '__NEW_PASSWORD__';" | su postgres -c "psql"
- Now, you need to allow the connection from localhost to the database over password.
To do that, edit the file /var/lib/pgsql/9.6/data/pg_hba.conf and changehost all all 127.0.0.1/32 indent
tohost all all 127.0.0.1/32 md5
- Restart the service
systemctl restart postgresql-9.6.service
- Test the connection superuser (postgres) over password
psql -h 127.0.0.1 -U postgres -W
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article