Yum简要配置example随记:修订间差异

来自三线的随记
无编辑摘要
无编辑摘要
第1行: 第1行:
also alias: DNF 简要配置example随记
also alias: DNF 简要配置example随记
=== 直接用iso作为 yum repo ===
[iso]
name=ISO
baseurl=file:///mnt/os/os-iso
enabled=1
gpgcheck=0
repo_gpgcheck=0


=== 直接用directory作为 yum repo ===
=== 直接用directory作为 yum repo ===

2022年4月13日 (三) 14:42的版本

also alias: DNF 简要配置example随记

直接用directory作为 yum repo

[directory-repo]
name=directory
baseurl=file:///root/directory/os-requirements-resources/repo/centos-7
enabled=1
gpgcheck=0
repo_gpgcheck=0
module_hotfixes=True

directory作为 yum repo的话文件夹下内容概要

[root@localhost centos-7]# ls -a
.  ..  Packages  repodata

repodata下内容概要

[root@localhost centos-7]# cd repodata/
[root@localhost repodata]# ls
17a0c7cff0884d983840e3f4db3e8d56996bd246a95944de35348396bb457d6d-other.sqlite.bz2  4de172fe99a91ec8648e29a0d164d2713ef8341e7a6a2665ef43e409be591cf1-filelists.sqlite.bz2  repomd.xml
3f9204c44002f8de302b335a02b4b5aefd5a4abf7de9db965de8688cbdee8c1d-other.xml.gz      a1d2873df3fccbd51f325140e0241daa3ed715675adf6aae9838664327be6d35-filelists.xml.gz
4d62094ad1c24cf491dec9b1d4e05bbbcf3a68ec9048f35ae2f2203ab8aa525c-primary.xml.gz    afbce1090b604174737efe7aa75a6bf35c7be3277dc7f49dd06df66990f8d0d8-primary.sqlite.bz2
[root@localhost repodata]#

常规形式

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7