2013-06-21 118 views
0

CentOS的6.4 postgres的9.2 ZABBIX 2.0zabbix如何成功完成安装?

PS

 1761 ?  Ss  0:00 postgres: logger process        
1763 ?  Ss  0:00 postgres: checkpointer process      
1764 ?  Ss  0:00 postgres: writer process        
1765 ?  Ss  0:00 postgres: wal writer process       
1766 ?  Ss  0:00 postgres: autovacuum launcher process    
1767 ?  Ss  0:00 postgres: stats collector process 
2257 ?  Ss  0:00 /usr/sbin/httpd 
2259 ?  S  0:00 /usr/sbin/httpd 
2260 ?  S  0:00 /usr/sbin/httpd 
2261 ?  S  0:00 /usr/sbin/httpd 
2262 ?  S  0:00 /usr/sbin/httpd 
2263 ?  S  0:00 /usr/sbin/httpd 
2264 ?  S  0:00 /usr/sbin/httpd 
2265 ?  S  0:00 /usr/sbin/httpd 
2266 ?  S  0:00 /usr/sbin/httpd 
2280 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2282 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2283 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2284 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2285 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2286 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2287 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2288 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2289 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2290 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2291 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2292 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2293 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2294 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2295 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2296 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2298 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51084) idle  
2299 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2300 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2301 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2302 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2303 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2304 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2305 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2306 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2307 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51085) idle  
2308 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51086) idle  
2309 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51087) idle  
2310 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51088) idle  
2311 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51089) idle  
2312 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51090) idle  
2313 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51091) idle  
2315 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51093) idle  
2316 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51094) idle  
2317 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51095) idle  
2318 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51096) idle  
2319 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51097) idle  
2320 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51098) idle  
2321 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2322 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2323 ?  S  0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf 
2324 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51099) idle  
2325 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51100) idle  
2326 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51101) idle  
2327 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51102) idle  
2328 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51103) idle  
2329 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51104) idle  
2330 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51105) idle  
2331 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51106) idle  
2332 ?  Ss  0:00 postgres: zabbix zabbix 127.0.0.1(51107) idle 

的pg_hba.conf

# TYPE DATABASE  USER   ADDRESS     METHOD 

local all all trust 
host all all 0.0.0.0/0 trust 
local zabbix  zabbix       md5 

postgresql.conf中

# - Connection Settings - 

listen_addresses = '*'  # what IP address(es) to listen on; 
        # comma-separated list of addresses; 
        # defaults to 'localhost'; use '*' for all 
        # (change requires restart) 
port = 5432    # (change requires restart) 
max_connections = 100 

zabbix_server.conf

DBHost=localhost 
DBName=zabbix 
DBUser=zabbix 
DBPassword=zabbix 
DBSocket=/tmp/.s.PGSQL.5432 

我可以连接并观察zabbix数据库在pgAdmin中没有任何问题。但ZABBIX安装在“3.配置数据库连接”过程中出现了:

pg_connect():无法连接到PostgreSQL服务器:无法连接到服务器:
拒绝权限是在主机上运行 服务器“ localhost“(127.0.0.1)并接受端口5432上的TCP/IP连接? [包括/ db.inc.php:99] 错误连接到数据库

如何成功地完成安装?

+0

更适合serverfault.com;这可能会很快关闭。感谢您提供所有错误消息,版本等的详细问题; +1。奇怪的错误,在TCP套接字连接()调用上的“权限被拒绝”。运行一些定制防火墙软件? SELinux的? –

回答

2

权限被拒绝当建立网络连接很可能是由于SELinux。检查/var/log/audit/audit.log中的错误消息

另请注意,DBSocket用于MySQL,它在PostgreSQL中被忽略。 要有ZABBIX通过本地的Unix域套接字连接到PostgreSQL,这将是:

 
DBHost=/tmp  # instead of localhost 
+0

问题出现在SE配置中。谢谢。 – 330xi

+0

即使它是错误的论坛,对我来说答案是有帮助的。我总是添加.s.PGSQL.5432,这不是必需的。 (实际上它没有工作:)/var/run/postgres /足够debian。 – Daywalker