1.下载离线安装包 到mariaDB官网下载安装包,我这里下载得10.4的,链接 https://mirrors.bkns.vn/mariadb/yum/10.4/centos7-aarch64/rpms/,下载如下安装包: 2.下载好后,按照顺序执行以下命令
yum install rsync nmap lsof perl-DBI nc
rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm
rpm -ivh jemalloc-devel-3.6.0-1.el7.x86_64.rpm
再执行以下安装命令
rpm -ivh MariaDB-common-10.4.24-1.el7.centos.x86_64.rpm \
MariaDB-compat-10.4.24-1.el7.centos.x86_64.rpm \
MariaDB-client-10.4.24-1.el7.centos.x86_64.rpm \
galera-4-26.4.11-1.el7.centos.x86_64.rpm \
MariaDB-server-10.4.24-1.el7.centos.x86_64.rpm
执行时报错: 观察错误信息发现2处问题。 问题1:系统本身有mariadb-libs与当前MariaDB-compat-10.4.24-1.el7.centos.x86_64包有冲突。查询并删除
rpm -qa | grep mariadb-libs
rpm -ev --nodeps mariadb-libs-5.5.68-1.el7.x86_64
问题2:缺失依赖libaio和socat 查询并安装libaio
yum search libaio
yum install libaio.x86_64 -y
安装socat
yum install socat
再次执行以下安装命令,命令执行成功
rpm -ivh MariaDB-common-10.4.24-1.el7.centos.x86_64.rpm \
MariaDB-compat-10.4.24-1.el7.centos.x86_64.rpm \
MariaDB-client-10.4.24-1.el7.centos.x86_64.rpm \
galera-4-26.4.11-1.el7.centos.x86_64.rpm \
MariaDB-server-10.4.24-1.el7.centos.x86_64.rpm
3.安全配置 启动服务
systemctl start mariadb.service
执行以下命令进行安装后的安全初始化设置
mysql_secure_installation
会有以下选项让你设置密码(自己虚拟机上安的设置为了root),和选择一些设置:
Enter current password for root (enter for none):
...
Switch to unix_socket authentication [Y/n] n
...
Change the root password? [Y/n] y
New password:
Re-enter new password:
...
Remove anonymous users? [Y/n] y
...
Disallow root login remotely? [Y/n] n
...
Remove test database and access to it? [Y/n] y
...
Reload privilege tables now? [Y/n] y
...
Thanks for using MariaDB!
当看到Thanks for using MariaDB!说明安装成功
|