我目前正在使用 apt-mirror 创建 Debian 存储库的本地镜像。
由于镜像存储库将仅由注定要成为无头服务器的机器使用,并且为了减少当前的镜像大小(大约 75GB),因此永远不需要像游戏和其他可能的类别。
我该如何去指定(可能在 mirror.list 上?)我想从镜像中排除哪些部分/类别?
也许有点主观,但除了游戏之外,出于我的环境目的,可以从镜像中“安全地”忽略哪些其他部分/类别?
我的 mirror.list 如下所示,因为所有机器都使用精确。
# MAIN
deb-amd64 http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse
# SECURITY
deb-amd64 http://archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
Run Code Online (Sandbox Code Playgroud)
另外,对于相对稳定的环境,您还建议将哪些其他内容添加到要镜像的列表中?我再次理解这是主观的,只是寻找一些指针。
可悲的是,apt-mirror
无法完成此类任务。同时,该debmirror
工具确实具有这样的功能:
--exclude-deb-section=regex
Never download any files whose Debian Section (games, doc, oldlibs,
science, ...) match the regex. May be used multiple times.
Run Code Online (Sandbox Code Playgroud)
这可以在/etc/debmirror.conf
. 只需复制 中的示例/usr/share/doc/debmirror/examples/debmirror.conf
,然后进行您喜欢的配置即可。重要的是# @excludes_deb_section="";
.