Fedora无法登录到phppgadmin,而是登录到psql



我有fedora 21,我想使用phpPgAdmin访问postgresql-db。为此,我安装了httpd和phppgadmin以及postgresql
我可以使用例如毫无问题地登录到pgql

psql -U learning -W template1

psql -W template1

但是当我输入localhost/phpPgAdmin时,我无法登录中登录尝试之间的差异

> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "POST /phpPgAdmin/redirect.php HTTP/1.1" 200 2268 "http://localhost/phpPgAdmin/redirect.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/browser.php HTTP/1.1" 200 3005 "http://localhost/phpPgAdmin/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/themes/default/global.css HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/libraries/js/jquery.js HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/xloadtree/xtree2.js HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/themes/global.css HTTP/1.1" 304 - "http://localhost/phpPgAdmin/themes/default/global.css" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/xloadtree/xloadtree2.js HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/title.png HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/Refresh.png HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/Servers.png HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/L.png HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/Loading.gif HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/I.png HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/servers.php?action=tree HTTP/1.1" 200 275 "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"
> 127.0.0.1 - - [04/Mar/2015:17:44:27 +0100] "GET /phpPgAdmin/images/themes/default/DisconnectedServer.png HTTP/1.1" 304 - "http://localhost/phpPgAdmin/browser.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"

my/var/lib/pgsql/data/pg_hba.conf是

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            ident
host    all             all             192.168.1.0/24          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

my/etc/phpPgAdmin/config.inc.php

$conf['extra_login_security'] = false;

这是我所能找到的使它工作的方法,但我不知道如何做到phpPgAdmin在失败登录时告诉我"Próba zalogowania nie poviodła siń.",这可能类似于"尝试登录失败"

localhost/phpMyAdmin工作正常

我能以某种方式了解我没有登录的原因吗?密码错误,没有服务器等?

解决方案我走了一条简单的路,重新安装了fedora,现在一切都正常了,但这实际上不是一个解决方案:P

试试这个。

如果这是您访问计算机的IP地址范围,请更改

host    all             all             192.168.1.0/24          ident

到这个

host    all             all             192.168.1.0/24          trust

修改后重新加载Postgres。看看你是否可以登录。

您可能还需要通过在postgres conf中更改来启用网络。

来自

listen_addresses='localhost'

listen_addresses='*' 

此外,请确保您已向用户授予所有适当的权限,使其能够访问该数据库或您想要管理的任何数据库

编辑:

这可能是SELinux的问题。您可以使用此命令暂时关闭SELinux进行测试。

setenforce 0

然后测试登录,看看它是否有效。如果它确实起作用,意味着selinux正在阻止访问,则应运行此命令以允许httpd在重新启动后继续工作。

setsebool -P httpd_can_network_connect_db 1

相关内容

  • 没有找到相关文章

最新更新