最快配置本地Yum仓库

前端之家收集整理的这篇文章主要介绍了最快配置本地Yum仓库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


配置本地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 ... .............................//省领略

原文链接:https://www.f2er.com/bash/390763.html

猜你在找的Bash相关文章