一. Tidb+Zabbix的部署
在之前的数据库所在server1上进行替换
tar zxf tidb-latest-linux-amd64.tar.gz
cd tidb-latest-linux-amd64
/bin/pd-server --name=pd1 --data-dir=pd1 --client-urls="http://172.25.1.1:2379" --peer-urls="http://172.25.1.1:2380" --initial-cluster="pd1=http://172.25.1.1:2380"
netstat -antlp | grep 2379
netstat -antlp | grep 2380
部署agent
./bin/tikv-server --pd="172.25.1.1:2379" --addr="172.25.1.1:20160" --data-dir=tikv1
开启zabbix及tidb
./bin/tidb-server
ps ax | grep tidb
netstat -antlp | grep 4000
因为在运行所以ctrl+z打入后台
数据库连接tidb
从tidb的4000端口连接:
mysql -p 4000 -uroot -pwestos
MySQL [(none)]> create database zabbix character set utf8 collate utf8_bin; ##创建数据库
MySQL [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'westos';
Query OK, 1 row affected (0.29 sec)
MySQL [(none)]> grant all privileges on *.* to 'zabbix'@'%'; ##用户授权
Query OK, 0 rows affected (0.00 sec)
vim /etc/zabbix/zabbix_server.conf
DBPort=4000
cd /etc/zabbix/web/
vim zabbix.conf.php
systemctl restart zabbix-server
systemctl restart zabbix-agent
web访问: