zabbix的高可用(pacemaker+haproxy)

实验目的:利用pacemaker+haproxy实现zabbix的高可用

实验环境:
两台centos
环境部署:

下载阿里源:
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

下载zabbix:
rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm

两台都关闭防火墙:
systemctl stop firewalld.service
systemctl disable firewalld.service
firewall-cmd --state
sed -i ‘/^SELINUX=./c SELINUX=disabled’ /etc/selinux/config
sed -i 's/^SELINUXTYPE=.
/SELINUXTYPE=disabled/g’ /etc/selinux/config
grep --color=auto ‘^SELINUX’ /etc/selinux/config
setenforce 0

安装软件:
yum install zabbix-server zabbix-web zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb zabbix-agent -y
yum install corosync pacemaker pcs fence-agents resource-agents -y
yum install haproxy -y

初始化数据库:
mysql_secure_installation

#SQL root密码:
DBPass=open2017
echo “#
[mysqld]
bind-address = 0.0.0.0
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
#”>/etc/my.cnf.d/openstack.cnf
在这里插入图片描述
实验开始:
一,双主配置:
vi /etc/my.cnf.d/openstack.cnf
1、配置文件里面加入以下三行
[mysqld]
log_bin=mysql-bin #开启二进制日志
server_id=1 #设置server id号
relay_log=m

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值