yum配置简介

Posted iaknehc

tags:

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

linux下面安装各种软件包都会面临一个头痛的问题,就是各种包之间的依赖性。但是有了yum这个工具就轻松多了。下面就对这个工具做一下简单的介绍说明。

yum工具的作用:解决rpm包安装时的依赖性 

以redhat6中yum配置文件做简要说明,使用vim打开,文件内容如下所示
vim /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel-source] yum容器名称,可随便定义,但是一定要放在[]内
name=Red Hat Enterprise Linux $releasever - $basearch - Source           容器说明,可自己定义
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/          yum源服务器地址
enabled=0          是否启用该yum源 1启用 0不启用
gpgcheck=1        rpm数字证书是否生效 1生效 0不生效
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release       数字证书公钥保存位置

 

以上是关于yum配置简介的主要内容,如果未能解决你的问题,请参考以下文章

yum 源仓库的安装及配置

yum简介及常用命令

yum简介(转)

yum源配置与详解

YUM 源配置与使用方法

yum 源的配置与使用