CentOS 7.2安装zabbix 3.2

前端之家收集整理的这篇文章主要介绍了CentOS 7.2安装zabbix 3.2前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

系统环境:LNMP

Linux: Centos 7.2

Nginx:1.10.3

MysqL:5.6.35

PHP:5.4.16


安装zabbix-server

1 Repository installation

  1. rpm-ivhhttp://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

2 Install Zabbix-server


  1. yuminstall-yzabbix-releasezabbix-server-MysqLzabbix-getzabbix-webzabbix-web-MysqLzabbix-agent

3 Creating initial database

  1. shell>MysqL-uroot-p<root_password>
  2. MysqL>createdatabasezabbixcharactersetutf8collateutf8_bin;
  3. MysqL>grantallprivilegesonzabbix.*tozabbix@localhostidentifiedby'<password>';
  4. MysqL>quit;


  1. zcat/usr/share/doc/zabbix-server-MysqL-3.2.*/create.sql.gz|MysqL-uzabbix-pzabbix

4 Database configuration for Zabbix server


  1. #vi/etc/zabbix/zabbix_server.conf
  2. DBHost=localhost
  3. DBName=zabbix
  4. DBUser=zabbix
  5. DBPassword=<password>

5Starting Zabbix server process


  1. #systemctlstartzabbix-server
  2. #systemctlenablezabbix-server

6PHP configuration for Zabbix frontend

  1. vi/etc/PHP.ini
  2. max_execution_time300
  3. memory_limit128M
  4. post_max_size16M
  5. upload_max_filesize2M
  6. max_input_time300
  7. always_populate_raw_post_data-1
  8. date.timezoneAsia/Shanghai


7. copy frontend web files

  1. cp-R/usr/share/zabbix/usr/local/Nginx/html

8. Starting Service

  1. /etc/init.d/PHP-fpm
  2. systemctlrestartNginx
  3. systemctlstartzabbix-server.service

9. Install web

http://localhost/zabbix


问题

A non well formed numeric value encountered [zabbix.PHP:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPHPMemoryLimit() → str2mem() in include/func.inc.PHP:410]
A non well formed numeric value encountered [zabbix.PHP:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPHPPostMaxSize() → str2mem() in include/func.inc.PHP:410]
A non well formed numeric value encountered [zabbix.PHP:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPHPUploadMaxFilesize() → str2mem() in include/func.inc.PHP:410]


安装完成之后启动就出现这个问题,这个是因为PHP 7.1.0类型强化,处理方法也很简单找到Zabbix WEB目录下include/func.inc.PHP文件

问题解决

  1. sed-i'/$last=strtolower(substr($val,-1));/a$val=substr($val,-1);'/usr/local/Nginx/html/zabbix/include/func.inc.PHP

猜你在找的CentOS相关文章