怎么配置rhel-source.repo

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了怎么配置rhel-source.repo相关的知识,希望对你有一定的参考价值。

参考技术A 修改yum配置文件(修改前先备份配置文件):
cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.bak
vi /etc/yum.repos.d/rhel-source.repo
[rhel-source] ---(仓库名称)
name=cdrom ---(名称随意)
baseurl=file:///yum -- (这个就是你要挂在的本地目录)
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
4.修改yum.conf文件,相同选项尽量保持一致
vi /etc/yum.conf
[rhel-source] ---(仓库名称,尽量保持一致)
name=cdrom ---(尽量保持一致) 《Linux就该这么学》 初学者一起交流。
baseurl=file:///yum ---(这个就是你要挂在的本地目录,必须保持一致)
enable=1
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=0
plugins=1
installonly_limit=3

以上是关于怎么配置rhel-source.repo的主要内容,如果未能解决你的问题,请参考以下文章

yum配置简介

Linux配置本地yum源

centos7yum安装的yum源怎么配置

本地光盘yum源的搭建

redhat linux 6.2 安装配置GUI

linux 配置本地yum源