我正在尝试在 CentOS7 上设置 Icinga 2 并按照官方文档中的说明进行操作。[ https://docs.icinga.com/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/getting-started][1 ]。我已经创建了数据库和用户作为 icinga。我面临以下问题 psql: FATAL: password authentication failed for user "icinga" when trying to import the Icinga 2 IDO schema using the following commands
export PGPASSWORD=icinga and psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql
下面是我正在使用的 pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# icinga
local icinga icinga md5
host icinga icinga 127.0.0.1/32 md5
host icinga icinga ::1/128 md5
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident