1.准备工作
安装基础依赖包在所有机器上面执行,以后都不在博客里面写$符号了,和Redis官方学的,写的我好累
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum makecache yum -y install perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch perl-ParallelForkManager perl-Config-IniFiles ncftp perl-Params-Validate perl-CPAN perl-TestMock-LWP.noarch perl-LWP-Authen-Negotiate.noarch perl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker yum install -y perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch perl-Parallel-ForkManager perl-YAML-Tiny perl-PAR-Dist perl-Module-ScanDeps perl-Module-CoreList perl-Module-Build perl-CPAN perl-CPANPLUS perl-File-Remove perl-Module-Install |
首先配置安装MHA NODE 和 MHA Manager
为了和mysql master做区分,我的manager安装到130机器,还记得在上一篇文章中 /home/local/mysql里面的安装包吗,如果找不到执行如下命令获取
cd /home/local/mysql wget https://github.com/yoshinorim/mha4mysql-node/releases/download/v0.58/mha4mysql-node-0.58.tar.gz wget https://github.com/yoshinorim/mha4mysql-manager/releases/download/v0.58/mha4mysql-manager-0.58.tar.gz
下载好了先别急着配置manager,所有节点都需要安装mha4mysql-node,所以我们先装node
给你们偷个懒,有更好的方法请留言 tar -zxvf /home/local/mysql/mha4mysql-node-0.58 |