1. 安装 OpenEuler 操作系统本篇不再赘述,请查询相关文档
2.安装MySQL,发现不通版本欧拉YUM源中,MySQL版本并不连续,因此可以选择相对高版本,来兼容所使用低版本MySQL。本篇使用欧拉信息如下:
名称 | 版本 | 内核版本 | 架构 |
---|
openEuler | 22.03 LTS | 5.10.0-60.83.0.107.oe2203.x86_64 | x86_64 |
3. 本篇安装MySQL版本为5.7.38, 如下:
yum install libaio
yum install perl-DBD-mysql
sudo yum install perl perl-CPAN perl-Net-SSLeay perl-IO-Socket-SSL
yum install pip
pip install iniparse
yum install chrony
yum install mysql5-server-5.7.38-1.oe2203.x86_64
Last metadata expiration check: 3:15:55 ago on Wed 01 Nov 2023 07:03:22 AM CST.
Dependencies resolved.
=============================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================
Installing:
mysql5-server x86_64 5.7.38-1.oe2203 update 18 M
Installing dependencies:
mariadb-config x86_64 4:10.5.16-1.oe2203 update 8.0 k
mecab x86_64 0.996-2.oe2203 everything 371 k
mysql5 x86_64 5.7.38-1.oe2203 update 7.6 M
mysql5-common x86_64 5.7.38-1.oe2203 update 71 k
mysql5-errmsg x86_64 5.7.38-1.oe2203 update 224 k
Transaction Summary
=============================================================================================================================================
Install 6 Packages
Total download size: 26 M
Installed size: 135 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): mariadb-config-10.5.16-1.oe2203.x86_64.rpm 14 kB/s | 8.0 kB 00:00
(2/6): mecab-0.996-2.oe2203.x86_64.rpm 514 kB/s | 371 kB 00:00
(3/6): mysql5-common-5.7.38-1.oe2203.x86_64.rpm 242 kB/s | 71 kB 00:00
(4/6): mysql5-errmsg-5.7.38-1.oe2203.x86_64.rpm 370 kB/s | 224 kB 00:00
(5/6): mysql5-5.7.38-1.oe2203.x86_64.rpm 825 kB/s | 7.6 MB 00:09
(6/6): mysql5-server-5.7.38-1.oe2203.x86_64.rpm 1.2 MB/s | 18 MB 00:14
---------------------------------------------------------------------------------------------------------------------------------------------
Total 1.7 MB/s | 26 MB 00:15
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mariadb-config-4:10.5.16-1.oe2203.x86_64 1/6
Installing : mysql5-common-5.7.38-1.oe2203.x86_64 2/6
Installing : mysql5-5.7.38-1.oe2203.x86_64 3/6
Installing : mysql5-errmsg-5.7.38-1.oe2203.x86_64 4/6
Installing : mecab-0.996-2.oe2203.x86_64 5/6
Running scriptlet: mecab-0.996-2.oe2203.x86_64 5/6
Running scriptlet: mysql5-server-5.7.38-1.oe2203.x86_64 6/6
Installing : mysql5-server-5.7.38-1.oe2203.x86_64 6/6
Running scriptlet: mysql5-server-5.7.38-1.oe2203.x86_64 6/6
Verifying : mecab-0.996-2.oe2203.x86_64 1/6
Verifying : mariadb-config-4:10.5.16-1.oe2203.x86_64 2/6
Verifying : mysql5-5.7.38-1.oe2203.x86_64 3/6
Verifying : mysql5-common-5.7.38-1.oe2203.x86_64 4/6
Verifying : mysql5-errmsg-5.7.38-1.oe2203.x86_64 5/6
Verifying : mysql5-server-5.7.38-1.oe2203.x86_64 6/6
Installed:
mariadb-config-4:10.5.16-1.oe2203.x86_64 mecab-0.996-2.oe2203.x86_64 mysql5-5.7.38-1.oe2203.x86_64
mysql5-common-5.7.38-1.oe2203.x86_64 mysql5-errmsg-5.7.38-1.oe2203.x86_64 mysql5-server-5.7.38-1.oe2203.x86_64
4. 安装MHA Node及Manager
MHA Node 可以直接安装,没有依赖约束,其中mha4mysql-node 可以通过RPM直接安装
rpm -ivh mha4mysql-node-0.58-0.el7.centos.noarch.rpm
MHA MANAGER 安装,需要编译,依赖perl module
yum install perl-CPAN
cpan Module::Install
yum install perl-DBD-mysql
perl -MCPAN -e shell
perl -MCPAN -e "install Config::Tiny"
perl -MCPAN -e "install Log::Dispatch"
perl -MCPAN -e "install Parallel::ForkManager"
cd mha4mysql-manager-0.58
perl Makefile.PL
make
make install
5.安装完成,进入自测试阶段