zhanghong 发表于 2019-1-22 12:53:11

安装zabbix2.4.8遇到的一些错误

  ZABBIX serve端安装的环境centos 6.7+apache2.2+MySQL5.1+PHP5.6的LAMP环境。
  zabbix安装选择的是官方最新2.4.8 rpm安装包;
  

  一、zabbix server安装中的报错
  配置阿里云的Zabbix_yum和epel仓库:

# yum-config-manager --add-repo="http://mirrors.aliyun.com/zabbix/zabbix/2.4/rhel/6/x86_64/"  使用 yum install方式安装:
# yum install zabbix zabbix-server zabbix-server-mysql zabbix-get zabbix-senderzabbix-web-mysql zabbix-web -y --nogpgcheck  LAMP安装配置参考我的博客,zabbix安装配置过程略过.....,详参考博客!
  到了web配置界面开始出现错误:
http://s4.运维网.com/wyfs02/M01/82/D5/wKioL1diKmLzXQy7AAKgzCoq6Vs167.png
  如图所示,出现上面的错误,都是在php.ini这个配置文件里面:
  修改/etc/php.ini文件中所对应的项目即可:
  比如我这里出现了两处错误:
  1、php time zone 报错
  解决方法:
  vim /etc/php.ini
  # 修改date.timezone = Asia/Shanghai

; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
date.timezone = Asia/Shanghai  2、PHP always_populate_raw_post_data 报错:
  解决方法:
vim /etc/php.ini
; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
; to disable this feature and it will be removed in a future version.
; If post reading is disabled through enable_post_data_reading,
; http://php.net/always-populate-raw-post-data
always_populate_raw_post_data = -1  # 去掉前面的;号,就可以了。

  

然后重启http服务:
# service httpd restart  F5刷新下web页面就OK了!
  还不行就reboot重启系统吧。
  
其它的php.ini配置参考:

  date.timezone = Asia/Shanghai
max_execution_time= 300
post_max_size = 32M
max_input_time = 300
memory_limit = 128M
mbstring.func_overload =2
  

  

  二、zabbix agent错误
  agent端如果配置错误,在server端的web主机监控界面表现出红色,一些无法连接server的错误信息,可以查看agent的log日志,来排查。
# tail -f /var/log/zabbix/zabbix_agentd.log
zabbix_agentd : cannot create PID file : Permission denied
zabbix_agentd : cannot create PID file : Permission denied  http://s2.运维网.com/wyfs02/M02/82/D6/wKiom1diMVjBN87vAAEvIZLt5VU072.png

  解决方法:
  由日志知道是pidFile错误,修改配置文件;

# vim /etc/zabbix/zabbix_agentd.conf
### Option: PidFile
#       Name of PID file.
#
# Mandatory: no
# Default:
PidFile=/tmp/zabbix_agentd.pid   
# 去掉上面一行的 # 号,启用默认的PidFile
# 注释掉下一行的PidFile
# PidFile=/var/run/zabbix/zabbix_agentd.pid  


  




页: [1]
查看完整版本: 安装zabbix2.4.8遇到的一些错误