博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
zabbix安装
阅读量:7042 次
发布时间:2019-06-28

本文共 2138 字,大约阅读时间需要 7 分钟。

hot3.png

zabbix 官网

zabbix4.0 安装

1)安装zabbix yum源

[root@feature1 ~]# rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

2)yum 安装

[root@feature1 ~]# yum install zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql

3)数据库操作

[root@feature1 ~]# mysql -uroot -prootWelcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 9Server version: 10.3.11-MariaDB-log MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> create database zabbix;Query OK, 1 row affected (0.003 sec)MariaDB [(none)]> grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'zabbix-pa';Query OK, 0 rows affected (0.020 sec)

4) 导入数据

/usr/share/doc/zabbix-server-mysql-4.0.5/create.sql.gz gzip -d /usr/share/doc/zabbix-server-mysql-4.0.5/create.sql.gz |mysql -uroot -proot zabbix

5) 编辑zabbix_server.conf

vi /etc/zabbix/zabbix_server.conf # 定义数据库相关的参数DBHost=127.0.0.1 DBPassword=zabbix-pa
systemctl start zabbix-serversystemctl enable zabbix-server

6)zabbix_agent.conf

vi /etc/zabbix/zabbix_agentd.conf #定义Server=127.0.0.1和 ServerActive=127.0.0.1systemctl start zabbix-agentsystemctl enable zabbix-agent

7)httpd

# 如果已经启动了nginx,需要先把nginx关闭,然后启动httpd[root@feature1 ~]# systemctl stop nginx[root@feature1 ~]# systemctl start httpd

8)webui配置

访问,解决php的问题

[root@feature1 ~]# vim /etc/php.inidate.timezone = Asia/Shanghai[root@feature1 ~]# systemctl restart httpd

(date.timezone Asia/Shanghai) /etc/php.ini 默认密码 admin zabbix

Database type  mysqlDatabase host 127.0.0.1Database port 0 0 - use default portDatabase name zabbixUser zabbixPassword

问题1

Details Cannot connect to the database. Error connecting to database: Can't connect to MySQL server on '127.0.0.1' (13)

[root@feature1 ~]# setsebool -P httpd_can_connect_zabbix on[root@feature1 ~]# setsebool -P httpd_can_network_connect_db on[root@feature1 ~]# systemctl restart httpd

问题2

Details Cannot connect to the database. The frontend does not match Zabbix database.

转载于:https://my.oschina.net/u/4066680/blog/3016372

你可能感兴趣的文章
Redis配置文件解析+单机多实例(主从)配置
查看>>
Android消息推送机制
查看>>
在ECS上搭建阿里云数据库RDS的只读实例
查看>>
Go语言开发(二十一)、GoMock测试框架
查看>>
Java基础学习总结(2)——接口
查看>>
MyBatis学习总结(三)——优化MyBatis配置文件中的配置
查看>>
Linux实用工具
查看>>
北大高材生被华为辞退:用不用你,与能力无关!
查看>>
21分钟Mysql入门教程
查看>>
Java的Struts多模块的应用
查看>>
自定义缓存类
查看>>
C++11: Multi-Thread思考.
查看>>
RFID设备管理C#客户端学习笔记之1:布局
查看>>
Linux Block Device Number Management
查看>>
在删除了文件后,磁盘空间却没有释放
查看>>
shell 脚本中获取mysql多个字段的值
查看>>
大型网络总结
查看>>
NFS详细配置过程
查看>>
rsync简单配置及实现
查看>>
【MVVM】- AngularJS基础学习
查看>>