首页 > 其他 > 详细

rhel7.x配置本地yum

时间:2017-12-25 21:19:28      阅读:187      评论:0      收藏:0      [点我收藏+]

转载:http://www.mvpbang.com/articles/2017/12/22/1513948827684.html

rhel7.x配置本地yum

环境: centos7.4 vmareworkstation11

01、加载iso 虚拟机–可移动设备–连接

02、挂载iso mount /dev/sr0 /mnt

03、移动yum源 mkdir /local_yum cp -a /mnt/{Packages,repodata,RPM-GPG-KEY-CentOS-7} /local_yum/

04、设置yum源

cd /etc/yum.repo.d/ mkdir bak

ls |grep -v bak |xargs -i mv {} bak/ #备份存在的yum

vim local.repo

[local_yum]

name=centos7.4

baseurl=file:///local_yum

enable=1

gpgcheck=1

gpgkey=file:///local_yum/RPM-GPG-KEY-CentOS-7

05、测试yum [root@lab-222 ~]# yum repolist

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile repo id repo name status local_yum centos7.4 3,894 repolist: 3,894

centos7.4 http://mirrors.ustc.edu.cn/centos/7.4.1708/isos/x86_64/

rhel7.x配置本地yum

原文:https://www.cnblogs.com/xiaochina/p/8111202.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!