mysql 5.7.29 在centos7.6下超简单的本地yum源安装与配置

生成yum源元数据

createrepo /usr/local/yum

[root@localhost tmp]# createrepo /usr/local/yum
Spawning worker 0 with 5 pkgs
Spawning worker 1 with 5 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost tmp]# ls /usr/local/yum
mysqlRPMs  repodata

从网易镜像站下载MySQL 5.7 的 bundle包

cd /tmp/
wget http://uni.mirrors.163.com/mysql/Downloads/MySQL-5.7/mysql-5.7.29-1.el7.x86_64.rpm-bundle.tar
#也可以从Windows上以QQ旋风等工具下载,然后运行pscp.exe上传到虚拟机
#pscp mysql-5.7.29-1.el7.x86_64.rpm-bundle.tar user@ip:/tmp/
tar -xf mysql-5.7.29-1.el7.x86_64.rpm-bundle.tar -C /usr/local/yum/mysqlRPMs

创建文件 mysql-local.repo

[root@localhost tmp]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# cat <EOF >mysql-local.repo
-bash: EOF: No such file or directory
[root@localhost yum.repos.d]# cat <<EOF >mysql-local.repo
> #the RPMs of MySQL server
> [mysql-local]
> name=mysql-local
> baseurl=file:///usr/local/yum
> gpgcheck=0
> enabled=1
> EOF

执行yum install命令

yum -y install mysql-community-server

参考:
mysql 5.7.23 在centos7.5下超简单的本地yum源安装与配置
Centos7 安装MySQL 5.7
用国内源在centos7安装zabbix3.0/4.0
以下办法在我这里不起作用
https://www.cnblogs.com/Erick-L/p/12710888.html

mysql 5.7.29 在centos7.6下超简单的本地yum源安装与配置

上一篇:Linux 命令行光标快速选中移动快捷键


下一篇:Java Service Wrapper 浅谈