安装zabbix httpd mysql
[root@localhost bin]# pd-server --data-dir=/data/pd --log-file=/data/logs/pd.log &
[1] 3402
[root@localhost bin]# tikv-server --pd="172.25.20.12:2379" --data-dir=/data/tikv --log-file=/data/logs/tikv.log &
[2] 3410
[root@localhost bin]# tidb-server --store=tikv --path="172.25.20.12:2379" --log-file=/data/logs/tidb.log &
[3] 3463
[root@localhost bin]# ps ax3402 pts/0 Sl 0:00 pd-server --data-dir=/data/pd --log-file=/data/logs/pd.log3410 pts/0 Sl 0:14 tikv-server --pd=172.25.20.12:2379 --data-dir=/data/tikv --log-file=/data/logs/tikv.log3463 pts/0 Sl 0:00 tidb-server --store=tikv --path=172.25.20.12:2379 --log-file=/data/logs/tidb.log3469 pts/0 R+ 0:00 ps ax
配置数据库
[root@localhost zabbix-server-mysql-3.4.6]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.7.1-TiDB-0.9.0 MySQL Community Server (Apache License 2.0)Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MySQL [(none)]> show databases;
+
| Database |
+
| INFORMATION_SCHEMA |
+
1 row in set (0.00 sec)MySQL [(none)]> CREATE DATABASE zabbix CHARSET 'utf8';
Query OK, 0 rows affected (0.34 sec)MySQL [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'westos';
Query OK, 0 rows affected (0.01 sec)MySQL [(none)]> show database;
ERROR 1105 (HY000): line 0 column 13 near "" (total length 13)
MySQL [(none)]> show databases;
+
| Database |
+
| INFORMATION_SCHEMA |
| zabbix |
+
2 rows in set (0.00 sec)MySQL [(none)]> use zabbix;
Database changed
MySQL [zabbix]> show tables;
Empty set (0.00 sec)
在将数据导入zabbix库
[root@localhost zabbix-server-mysql-3.4.6]
导入完成后 查看
Aborted
[root@localhost zabbix-server-mysql-3.4.6]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.7.1-TiDB-0.9.0 MySQL Community Server (Apache License 2.0)Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MySQL [(none)]> use zabbix
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
MySQL [zabbix]> show tables;
+**************************
| trigger_depends |
| trigger_discovery |
| trigger_tag |
| triggers |
| users |
| users_groups |
| usrgrp |
| valuemaps |
| widget |
| widget_field |
+
140 rows in set (0.00 sec)MySQL [zabbix]>
其他配置与前一部分相同 添加端口
添加php脚本
[root@localhost web]
[root@localhost web]
/etc/zabbix/web
global $DB;$DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = '172.25.20.12';
$DB['PORT'] = '4000';
$DB['DATABASE'] = 'zabbix';
$DB['USER'] = 'zabbix';
$DB['PASSWORD'] = 'westos';$DB['SCHEMA']='';$ZBX_SERVER = 'localhost';
$ZBX_SERVER_PORT ='10051';
$ZBX_SERVER_NAME ='zabbixServer';$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
启动登陆浏览器