修改yum源

1.本地yum源  

  (1)yum install createrepo -y  //安装制作yum源工具

  (2)将安装文件解压放到一个文件夹中

  (3)createrepo mysql5.7   //制作依赖关系表

  (4)修改本地yum源配置文件

  vim mysql.repo

  [yum]

  name=mysql5.7

  baseurl=file///mnt/

  enabled=1

  gpgcheck=0

2.网络yum源

  (1)本地yum源配置文件

  vim mysql.repo

  [mysql]

  name=mysql5.7

  baseurl=http://172.25.22.10/mysql5.7

  enabled=1

  gpgcheck=0

   (2) 只需要将制作好的yun源文件放到172.25.22.10/mysql5.7目录下即可

3. 

  yum clean all    //清除缓存

  yum makecache //加载缓存

 

原文地址:https://www.cnblogs.com/sangmu/p/6710758.html