环境:
OS:Centos 7
1.安装相应的软件包
yum -y install perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch perl-Parallel-ForkManager perl-Time-HiRes
yum -y install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker cpan
yum -y install perl-ExtUtils-Embed
yum -y install perl-CPAN
2.管理节点
注意在安装管理软件之前需要先安装node节点的软件包
首先安装node软件
[root@pxc01 mha]# tar -xvf mha4mysql-node-0.57.tar.gz
[root@pxc01 mha]#cd mha4mysql-node-0.57
[root@pxc01 mha]#perl Makefile.PL
[root@pxc01 mha]#make && make install
安装manager软件
[root@pxc01 mha]# tar -xvf mha4mysql-manager-0.57.tar.gz
[root@pxc01 mha]# cd mha4mysql-manager-0.57
[root@pxc01 mha]#perl Makefile.PL
[root@pxc01 mha]#make && make install
3.数据节点安装
只需要安装node软件
[root@pxc01 mha]# tar -xvf mha4mysql-node-0.57.tar.gz
[root@pxc01 mha]#cd mha4mysql-node-0.57
[root@pxc01 mha]#perl Makefile.PL
[root@pxc01 mha]#make && make install
以上安装默认会安装在/usr/local/bin目录下
遇到的问题:
问题1:
相应的包都安装了,但是在执行perl Makefile.PL包如下错误
Can't locate ExtUtils/MakeMaker.pm
解决办法,卸载依赖包后重新安装
yum remove perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch perl-Parallel-ForkManager perl-Time-HiRes
yum remove perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
yum remove perl-ExtUtils-Embed
yum remove perl-CPAN
问题2:
软件安装到了如下目录
/root/perl5/bin
解决办法:未解决
问题3:
[mysql@localhost perl5]$ /root/perl5/bin/masterha_check_ssh --conf=/opt/mha_software/conf/myha.cnf
Can't locate MHA/SSHCheck.pm in @INC
解决办法:
[root@localhost /]# find / -name SSHCheck.pm
/root/perl5/lib/perl5/MHA/SSHCheck.pm
在mysql账号的.bash_profile添加如下项,然后重新登录
export PERL5LIB=$PERL5LIB:/root/perl5/lib/perl5/
阅读(2465) | 评论(0) | 转发(0) |