In this article you will know how to fix this error:
psql: FATAL: Ident authentication failed for user "username"which happens when you try to connect as follows:
psql -U username -h 127.0.0.1 -d postgres
psql: FATAL: Ident authentication failed for user "username"which happens when you try to connect as follows:
psql -U username -h 127.0.0.1 -d postgres
sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm(for the list of all options, check this link: https://yum.postgresql.org/repopackages.php)
sudo yum remove nginx*
sudo yum update sudo yum install zlib-devel openssl-devel