mha自定义路径安装

环境:
Centos 7

这里是在管理节点上安装,需要安装manager软件包和node软件包,首先必须先安装node软件包
1.首先安装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 INSTALL_BASE=/opt/mha_software
[root@pxc01 mha]#make && make install
perl Makefile.PL INSTALL_BASE=/opt/mha_software

/opt/mha_software目录可以提前创建好
mkdir -p /opt/mha_software

2.配置环境变量
这里需要将node包的安装路径加入到root的环境变量下面,否则的话安装管理包的时候会提示缺少MHA::NodeConst,如下
[root@localhost mha4mysql-manager-0.57]# perl Makefile.PL INSTALL_BASE=/opt/mha_software
*** Module::AutoInstall version 1.06
*** Checking for Perl dependencies...
[Core Features]
- DBI                   ...loaded. (1.627)
- DBD::mysql            ...loaded. (4.023)
- Time::HiRes           ...loaded. (1.9725)
- Config::Tiny          ...loaded. (2.14)
- Log::Dispatch         ...loaded. (2.41)
- Parallel::ForkManager ...loaded. (1.18)
- MHA::NodeConst        ...missing.

添加的环境变量如下:
export PERL5LIB=$PERL5LIB:/opt/mha_software/lib/perl5/

3.安装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 INSTALL_BASE=/opt/mha_software
[root@pxc01 mha]#make && make install

INSTALL_BASE这里指定的路径跟node节点安装的一样

posted @ 2019-09-30 14:30  slnngk  阅读(494)  评论(0编辑  收藏  举报