本文以BClinux for euler 21.10(redhat/centos可以参考)为例。在本地内网(Linux主机无法连接互联网,能连接公网最好,不能也没关系)编译安装。
经过多次尝试,多次重装主机发现,目前Bclinux for openeuler不能安装mysql8的最新版本(centos7.x,centos8.x也不行)。
所以本次安装的mysql8的版本为mysql8.0.20
安装前请先确认自己的利用体系版本.主机规格等是否符合要求。mysql的最小要求配置要求为2核2G(如果同时运行其他程序则必要更高配置),安装至少必要给mysql预留30G空间
我的配置如下
# 系统信息如下
[root@localhost ~]# cat /etc/os-release
NAME="BigCloud Enterprise Linux"
VERSION="21.10 (LTS-SP2)"
ID="bclinux"
VERSION_ID="21.10"
PRETTY_NAME="BigCloud Enterprise Linux For Euler 21.10 LTS"
[root@localhost /]# su - mysql[mysql@localhost ~]$ sudo yum install -y tree
We trust you have received the usual lecture from the local SystemAdministrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.[sudo] password for mysql: Last metadata expiration check: 0:37:52 ago on Fri 12 Jul 2024 04:38:07 PM CST.Package tree-1.8.0-1.oe1.x86_64 is already installed.Dependencies resolved.Nothing to do.Complete!
复制代码
配置环境变量,方便利用MySQL的命令
[root@localhost ~]# vi /etc/profile
export MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:$MYSQL_HOME/bin
[root@localhost ~]# source /etc/profile
[root@localhost ~]# mysql --version # 验证配置是否成功
mysql Ver 8.0.20 for Linux on x86_64 (Source distribution)