• 欢迎访问显哥博客,本网站纯属学习技术,绝无商业用途,欢迎小伙伴们共同学习!研究技术!QQ:52249909 加我QQ
  • 世界75亿人,这么小的概率,能认识你,是我一生的幸运,不妨加个QQ接触一下:52249909 加我QQ

企业级zabbix监控实战——zabbix服务端数据库分离【显哥出品,必为精品】

Zabbix监控 lixian 4年前 (2020-05-18) 693次浏览 1个评论 扫描二维码

1.数据库端部署Mariadb服务

[root@db01 ~]# yum install -y mariadb-server
[root@db01 ~]# systemctl restart mariadb.service 
[root@db01 ~]# mysqladmin password '123456'
[root@db01 ~]# mysql -uroot -p123456
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'172.16.1.%' identified by 'zabbix';

2.zabbix服务端修改数据库地址并导出sql到数据库端

[root@zabbix-server ~]# vim /etc/zabbix/zabbix_server.conf 
DBHost=172.16.1.51
[root@zabbix-server ~]# vim /etc/zabbix/web/zabbix.conf.php 
$DB['SERVER']   = '172.16.1.51';
[root@zabbix-server ~]# mysqldump -uroot -p123456 -B zabbix > zabbix.sql
[root@zabbix-server ~]# scp -rp zabbix.sql 172.16.1.51:

3.数据库端导入sql文件

[root@db01 ~]# mysql -uroot -p123456 <zabbix.sql

4.zabbix服务端重启服务并停掉数据库

[root@zabbix-server ~]# systemctl restart zabbix-server.service httpd.service 
[root@zabbix-server ~]# systemctl stop mariadb.service

5.发现有部分是没有数据的,导出数据库到重启配置文件的那段时间是没有数据的

企业级zabbix监控实战——zabbix服务端数据库分离【显哥出品,必为精品】


本站博主 , 版权所有丨如未注明 , 均为原创
转载请注明原文链接:企业级zabbix监控实战——zabbix服务端数据库分离【显哥出品,必为精品】
喜欢 (1)

您必须 登录 才能发表评论!

(1)个小伙伴在吐槽
  1. Looking forward to reading more. great article. Really looking forward to reading more books. cool. I really enjoy reading a thought provoking article. Also, thanks for allowing me to comment!