我遇到了一些需要安装 PostgreSQL 才能运行 SIlverpeas 项目的问题。
通常,postgres 部分已正确配置,因为我已发送命令使用户 silverpeas 成为数据库 silverpeas 的所有者,并且我可以使用“pgsql -U silverpeas silverpeas”通过 ssh 连接
现在,我正在尝试让我的 phpPgAdmin 工作。他与 Postgresql(版本 9.5)在同一台服务器 Centos 6.7 上。
当我尝试连接时,我收到一条连接失败消息,有时,当我尝试解决问题时,我收到“尝试破解您的系统”消息。
当我在寻找 pgsql 日志文件时,在连接试验后,我收到了这条消息:
< 2016-03-16 11:32:39.378 CET >LOG: could not connect to Ident server at address "::1", port 113: Connection refused
< 2016-03-16 11:32:39.378 CET >FATAL: Ident authentication failed for user "silverpeas"
< 2016-03-16 11:32:39.378 CET >DETAIL: Connection matched pg_hba.conf line 84: "host all all ::1/128 ident"
问题是,我的 /var/lib/pgsql/9.5/data/pg_hba.conf 是这样的:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 10.1.1.0/8 md5
如果我寻找 /var/lib/pgsql/9.5/data/postgresql.conf 文件:
listen_addresses = 'localhost'
我的 phpPgAdmin 配置是:
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = 'localhost';
// Database port on server (5432 is the PostgreSQL default)
$conf['servers'][0]['port'] = 5432;
// Database SSL mode
// Possible options: disable, allow, prefer, require
// To require SSL on older servers use option: legacy
// To ignore the SSL mode, use option: unspecified
$conf['servers'][0]['sslmode'] = 'allow';
// Change the default database only if you cannot connect to template1.
// For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
$conf['servers'][0]['defaultdb'] = 'silverpeas';
建议?