#########zabbix##########
zabbix的安装使用
#现有监控方案:zabbix | prometheus
#启一台虚拟机先搭建server端
[root@server1 ~]# cd 4.0
[root@server1 ~]# yum install -y zabbix-server-mysql-4.0.5-1.el7.x86_64.rpm zabbix-web-mysql-4.0.5-1.el7.noarch.rpm zabbix-web-4.0.5-1.el7.noarch.rpm zabbix-agent-4.0.5-1.el7.x86_64.rpm php-mbstring-5.4.16-42.el7.x86_64.rpm php-bcmath-5.4.16-42.el7.x86_64.rpm fping-3.10-1.el7.x86_64.rpm iksemel-1.4-2.el7.centos.x86_64.rpm
#安装数据库
[root@server1 ~]# yum install -y mariadb-server
[root@server1 ~]# systemctl start mariadb
##初始化zabbix数据库
[root@server1 mysql]# mysql_secure_installation
##按照官网配置 https://www.zabbix.com/cn/download
#创建数据库
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'redhat';
##导入初始架构和数据
[root@server1 ~]# zcat /usr/share/doc/zabbix-server-mysql-4.0.5/create.sql.gz | mysql -uzabbix -p zabbix
##配置zabbix-server
vim /etc/zabbix/zabbix_server.conf
124 DBPassword=redhat
#启动
systemctl start zabbix-server
systemctl start zabbix-agent
#修改php配置
vim /etc/httpd/conf.d/zabbix.conf
20 php_value date.timezone Asia/Shanghai
#启动
systemctl start httpd
##浏览器访问
http://172.25.0.1/zabbix
##Confiure DB connection
Password : redhat ##其他选默认
##Zabbix server details
Name : Zabbix server ##自己起名字,其他默认
#以上的配置信息都在 /etc/zabbix/web/zabbix.conf.php 文件中
##登录zabbix
Username : Admin
Password : zabbix
##登录后右上角人头按钮点击,选择中文