您好,登錄后才能下訂單哦!
Mysql MHA部署中怎么進行MHA軟件安裝,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學習下,希望你能有所收獲。
Mysql MHA部署-MHA軟件安裝
架構說明:
參考: http://www.zhaibibei.cn/mysql/mha/
1 MHA Node安裝(rac1,rac2,rac3,rac4)
我們需要在所有機器上安裝Node軟件(包括管理節點)
安裝之前我們需要先安裝相關perl的依賴包
下載安裝包:
這里使用yum安裝,未聯網的請使用操作系統ISO中的軟件包配置本地yum源
安裝包網盤鏈接: https://pan.baidu.com/s/18H12bTIYHi2H0dXs2DI7NA 提取碼: mwkq
[root@rac1 mha]# pwd
/package/mysql/MHA/mha
[root@rac1 mha]# ll -rth
total 700K
-rw-r--r-- 1 root root 400 Mar 14 13:42 download.txt
-rw-r--r-- 1 root root 84K Mar 14 13:42 mha4mysql-manager-0.56-0.el5.noarch.rpm
-rw-r--r-- 1 root root 86K Mar 14 13:42 mha4mysql-manager-0.56-0.el6.noarch.rpm
-rw-r--r-- 1 root root 112K Mar 14 13:42 mha4mysql-manager-0.56.tar.gz
-rw-r--r-- 1 root root 80K Mar 14 13:42 mha4mysql-manager-0.57-0.el7.noarch.rpm
-rw-r--r-- 1 root root 116K Mar 14 13:42 mha4mysql-manager-0.57.tar.gz
-rw-r--r-- 1 root root 36K Mar 14 13:42 mha4mysql-node-0.56-0.el5.noarch.rpm
-rw-r--r-- 1 root root 36K Mar 14 13:42 mha4mysql-node-0.56-0.el6.noarch.rpm
-rw-r--r-- 1 root root 49K Mar 14 13:42 mha4mysql-node-0.56.tar.gz
-rw-r--r-- 1 root root 35K Mar 14 13:42 mha4mysql-node-0.57-0.el7.noarch.rpm
-rw-r--r-- 1 root root 54K Mar 14 13:42 mha4mysql-node-0.57.tar.gz
開始安裝:
[root@rac1 mha]# yum install perl-DBD-MySQL
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml"
Trying other mirror.
Package perl-DBD-MySQL-4.023-6.el7.x86_64 already installed and latest version
Nothing to do
[root@rac1 mha]# rpm -ivh mha4mysql-node-0.56-0.el6.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:mha4mysql-node-0.56-0.el6 ################################# [100%]
2 MHA Manager安裝
我們需要在manager上安裝Manager軟件
同樣安裝Manager需要一些依賴包
這里使用yum安裝,未聯網的請使用操作系統ISO中的軟件包配置本地yum源
一些rpm包包含在上面的網盤中
由于依賴有點多,大家可以按照我下面的步驟進行,注意有的命令最后有星號
root用戶
rpm -ivh perl-Config-Tiny-2.12-1.el6.rfx.noarch.rpm
rpm -ivh perl-Time-HiRes-1.9724-1.el6.rfx.x86_64.rpm
yum install perl-Params-Validate
rpm -ivh perl-Log-Dispatch-2.26-1.el6.rf.noarch.rpm
yum install perl-Parallel-ForkManager*
rpm -ivh mha4mysql-manager-0.56-0.el6.noarch.rpm
其中perl-Parallel-ForkManager下載地址:
https://centos.pkgs.org/7/epel-aarch74/perl-Parallel-ForkManager-1.18-2.el7.noarch.rpm.html
Binary Packagehttps://download-ib01.fedoraproject.org/pub/epel/7/aarch74/Packages/p/perl-Parallel-ForkManager-1.18-2.el7.noarch.rpm
Source Packagehttps://download-ib01.fedoraproject.org/pub/epel/7/SRPMS/Packages/p/perl-Parallel-ForkManager-1.18-2.el7.src.rpm
或者全部手動安裝
rpm -ivh perl-Config-Tiny-2.12-7.1.el6.noarch.rpm
rpm -ivh mha4mysql-node-0.56-0.el6.noarch.rpm
rpm -ivh perl-DBD-MySQL-4.013-3.el6.i686.rpm
rpm -ivh compat-db43-4.3.29-15.el6.x86_64.rpm
rpm -ivh perl-Mail-Sender-0.8.16-3.el6.noarch.rpm
rpm -ivh perl-Parallel-ForkManager-0.7.9-1.el6.noarch.rpm
rpm -ivh perl-TimeDate-1.16-11.1.el6.noarch.rpm
rpm -ivh perl-MIME-Types-1.28-2.el6.noarch.rpm
rpm -ivh perl-MailTools-2.04-4.el6.noarch.rpm
rpm -ivh perl-Email-Date-Format-1.002-5.el6.noarch.rpm
rpm -ivh perl-Params-Validate-0.92-3.el6.
rpm -ivh perl-Params-Validate-0.92-3.el6.x86_64.rpm
rpm -ivh perl-MIME-Lite-3.027-2.el6.noarch.rpm
rpm -ivh perl-Mail-Sendmail-0.79-12.el6.noarch.rpm
rpm -ivg perl-Log-Dispatch-2.27-1.el6.noarch.rpm
rpm -ivh mha4mysql-manager-0.56-0.el6.noarch.rpm
3. 驗證安裝
到這里我們已經安裝完成了,下面來驗證下
[root@rac4 mha]# rpm -ql mha4mysql-manager
/usr/bin/masterha_check_repl
/usr/bin/masterha_check_ssh
/usr/bin/masterha_check_status
/usr/bin/masterha_conf_host
/usr/bin/masterha_manager
/usr/bin/masterha_master_monitor
/usr/bin/masterha_master_switch
/usr/bin/masterha_secondary_check
/usr/bin/masterha_stop
/usr/share/man/man1/masterha_check_repl.1.gz
/usr/share/man/man1/masterha_check_ssh.1.gz
/usr/share/man/man1/masterha_check_status.1.gz
/usr/share/man/man1/masterha_conf_host.1.gz
/usr/share/man/man1/masterha_manager.1.gz
/usr/share/man/man1/masterha_master_monitor.1.gz
/usr/share/man/man1/masterha_master_switch.1.gz
/usr/share/man/man1/masterha_secondary_check.1.gz
/usr/share/man/man1/masterha_stop.1.gz
/usr/share/perl5/vendor_perl/MHA/Config.pm
/usr/share/perl5/vendor_perl/MHA/DBHelper.pm
/usr/share/perl5/vendor_perl/MHA/FileStatus.pm
/usr/share/perl5/vendor_perl/MHA/HealthCheck.pm
/usr/share/perl5/vendor_perl/MHA/ManagerAdmin.pm
/usr/share/perl5/vendor_perl/MHA/ManagerAdminWrapper.pm
/usr/share/perl5/vendor_perl/MHA/ManagerConst.pm
/usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm
/usr/share/perl5/vendor_perl/MHA/MasterFailover.pm
/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm
/usr/share/perl5/vendor_perl/MHA/MasterRotate.pm
/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm
/usr/share/perl5/vendor_perl/MHA/Server.pm
/usr/share/perl5/vendor_perl/MHA/ServerManager.pm
[root@rac4 mha]# rpm -ql mha4mysql-node
/usr/bin/apply_diff_relay_logs
/usr/bin/filter_mysqlbinlog
/usr/bin/purge_relay_logs
/usr/bin/save_binary_logs
/usr/share/man/man1/apply_diff_relay_logs.1.gz
/usr/share/man/man1/filter_mysqlbinlog.1.gz
/usr/share/man/man1/purge_relay_logs.1.gz
/usr/share/man/man1/save_binary_logs.1.gz
/usr/share/perl5/vendor_perl/MHA/BinlogHeaderParser.pm
/usr/share/perl5/vendor_perl/MHA/BinlogManager.pm
/usr/share/perl5/vendor_perl/MHA/BinlogPosFindManager.pm
/usr/share/perl5/vendor_perl/MHA/BinlogPosFinder.pm
/usr/share/perl5/vendor_perl/MHA/BinlogPosFinderElp.pm
/usr/share/perl5/vendor_perl/MHA/BinlogPosFinderXid.pm
/usr/share/perl5/vendor_perl/MHA/NodeConst.pm
/usr/share/perl5/vendor_perl/MHA/NodeUtil.pm
/usr/share/perl5/vendor_perl/MHA/SlaveUtil.pm
看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。