加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

最快配置本地Yum仓库

发布时间:2020-12-15 16:19:07 所属栏目:安全 来源:网络整理
导读:配置本地Yum仓库 [root@localhost test]# lsaa.txt bb.txt rhel-6.4-x86_64.iso test.sh[root@localhost test]# mount -o loop rhel-6.4-x86_64.iso /media/ //系统介质挂载到/media/[root@localhost yum.repos.d]# cd /etc/yum.repos.d/ | lsrhel-source.re


配置本地Yum仓库

[root@localhost test]# lsaa.txt bb.txt rhel-6.4-x86_64.iso test.sh[root@localhost test]# mount -o loop rhel-6.4-x86_64.iso /media/ //系统介质挂载到/media/[root@localhost yum.repos.d]# cd /etc/yum.repos.d/ | lsrhel-source.repo[root@localhost yum.repos.d]# cp rhel-source.repo rhel-source.repo.bak[root@localhost yum.repos.d]# vim rhel-source.repo[root@localhost yum.repos.d]# cat rhel-source.repo[rhel-source] //[rhel-source]与下面的[rhel-source-beta]改一个就好,这是两个源name=Red Hat Enterprise Linux $releasever - $basearch - Sourcebaseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[rhel-source-beta]name=Red Hat Enterprise Linux $releasever Beta - $basearch - Sourcebaseurl=file:///media/enabled=1 //是否启用,1为启用,0为不启用gpgcheck=1 //是否校验gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release//配置文件完成,yum配置结束,下面安装一个软件测试是否成功[root@localhost yum.repos.d]# [root@localhost yum.repos.d]# yum install gcc //测试安装Loaded plugins: product-id,refresh-packagekit,security,subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.rhel-source-beta | 3.9 kB 00:00 ... rhel-source-beta/primary_db | 3.1 MB 00:00 ... .............................//省领略

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读