UNPKG

2.49 kBMarkdownView Raw
1reposync
2===
3
4同步yum存储库到本地目录
5
6## 概要
7
8```shell
9reposync [选项]
10```
11
12## 主要用途
13
14reposync用于将远程yum存储库同步到本地目录,使用yum检索包。
15
16## 选项
17
18```shell
19-h, --help
20# 显示帮助信息
21
22-c CONFIG, --config=CONFIG
23# 指定配置文件(默认为/etc/yum.conf)
24
25-a ARCH, --arch=ARCH
26# 指定arch
27
28--source
29# 同时下载src和rpm文件.
30
31-r REPOID, --repoid=REPOID
32# 指定要查询的repo id,可以指定多次(默认为全部启用)。
33
34-e CACHEDIR, --cachedir CACHEDIR
35# 存储元数据的目录。
36
37-t, --tempcache
38# 使用临时目录存储/访问yum-cache。
39
40-d, --delete
41# 删除存储库中不再存在的本地包。
42
43-p DESTDIR, --download_path=DESTDIR
44# 指定下载路径:默认为当前目录。
45
46--norepopath
47# 不要将重命名添加到下载路径中。只能在同步单个存储库时使用(默认是添加重命名)。
48
49-g, --gpgcheck
50# 下载后删除GPG签名检查失败的包。如果至少有一个包被删除,退出状态为“1”。
51
52-u, --urls
53# 只列出要下载的内容的url,不要下载。
54
55-l, --plugins
56# 启用yum插件支持。
57
58-m, --downloadcomps
59# 同时下载comps.xml。
60
61--download-metadata
62# 下载所有非默认元数据。
63
64-n, --newest-only
65# 每个repo只下载最新的包。
66
67-q, --quiet
68# 输出尽可能少的信息。
69
70--allow-path-traversal
71# 允许同步存储在repo目录之外的包。这些包是在元数据中通过使用绝对路径或上一级“..”系统引用的并且出于安全原因通常会在reposync中跳过。
72# 注意:使用此选项有潜在的安全隐患,因为通过提供恶意repodata,攻击者可以使reposync写入任意位置运行该文件系统的用户可以访问的文件系统。
73```
74
75## 例子
76
77```shell
78# 将'updates'仓库中的所有包同步到当前目录:
79reposync --repoid=updates
80
81# 只同步最新的包从'updates'仓库到当前目录:
82reposync -n --repoid=updates
83
84# 将'updates'和'extras'仓库中的包同步到当前目录:
85reposync --repoid=updates --repoid=extras
86
87# 将'updates'仓库中的所有包同步到repos目录:
88reposync -p repos --repoid=updates
89
90# 将'updates'仓库中的所有包同步到repos目录,排除x86_64架构文件。编辑/etc/yum.conf,添加选项exclude=*.x86_64。再执行:
91reposync -p repos --repoid=updates
92```
93
94## 文件
95
96reposync使用yum库来检索信息和包。如果没有指定配置文件,将使用默认的yum配置。
97
98* /etc/yum.conf
99* /etc/yum/repos.d/
100