为两个 ubuntu 版本安装 apt-cacher 服务器

kar*_*k87 7 mirrors apt-cacher

是否可以在一台机器上同时拥有适用于 Ubuntu 10.04 和 10.10 版本的 apt-cacher 服务器?如果是的话,有人可以解释一下吗?

Ubuntu 10.10 的第一个 CD 缓存工作正常。

我已经导入了 Ubuntu 10.04 版的第二个 cd 缓存,现在当我更新 Ubuntu 10.04 客户端时,出现以下错误..

root@TME51:/etc/apt# apt-get update
Err http://172.29.32.9 lucid Release.gpg
  Could not connect to 172.29.32.9:3142 (172.29.32.9). - connect (111: Connection refused)
Err http://172.29.32.9/ubuntu/ lucid/main Translation-en_IN
  Unable to connect to 172.29.32.9:3142:
Err http://172.29.32.9/ubuntu/ lucid/restricted Translation-en_IN
  Unable to connect to 172.29.32.9:3142:
Err http://172.29.32.9/ubuntu/ lucid/universe Translation-en_IN
  Unable to connect to 172.29.32.9:3142:
Err http://172.29.32.9/ubuntu/ lucid/multiverse Translation-en_IN
  Unable to connect to 172.29.32.9:3142:
Reading package lists... Done
W: Failed to fetch http://172.29.32.9:142/ubuntu/dists/lucid/Release.gpg  Could not connect to 172.29.32.9:3142 (172.29.32.9). - connect (111: Connection refused)

W: Failed to fetch http://172.29.32.9:142/ubuntu/dists/lucid/main/i18n/Translation-en_IN.bz2  Unable to connect to 172.29.32.9:3142:

W: Failed to fetch http://172.29.32.9:142/ubuntu/dists/lucid/restricted/i18n/Translation-en_IN.bz2  Unable to connect to 172.29.32.9:3142:

W: Failed to fetch http://172.29.32.9:142/ubuntu/dists/lucid/universe/i18n/Translation-en_IN.bz2  Unable to connect to 172.29.32.9:3142:

W: Failed to fetch http://172.29.32.9:142/ubuntu/dists/lucid/multiverse/i18n/Translation-en_IN.bz2  Unable to connect to 172.29.32.9:3142:

W: Some index files failed to download, they have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)

hhl*_*hlp 6

apt-cacher

当使用相同的发行版运行多台机器时,在您的网络上设置存储库缓存很有趣,这样一旦从官方存储库下载包,所有其他机器都会从您的局域网下载它。

让不同的机器运行相同的 linux 发行版,在网络上的某处设置存储库缓存变得很有趣。这样,您不会从官方存储库中下载常用包超过 1 次。

情况是这样的,我们有一台叫做 repository-cache 的机器,这台机器将充当存储库缓存,基本上,网络中的任何其他机器都将使用它作为存储库。

1. 如何使用 apt-cacher 设置存储库缓存

如何使用 apt-cacher 设置存储库缓存

2. 结论

apt-cacher 是一个简单而高效的软件包,它可以在使用具有相同分布的多台机器时节省您的时间和带宽就像在家庭网络或公司中可能发生的那样。


apt-mirror

它是一个基于 perl 的实用程序,用于下载和镜像公共存储库的全部内容。这可能包括您不使用和不会使用的包,但存储在公共存储库中的任何内容也将存储在您的镜像中。

1. 如何使用 apt-cacher 设置存储库缓存

要配置 apt-mirror,您需要以下内容:

apt-mirror package `sudo apt-get install apt-mirror`
apache2 package  `sudo apt-get install apache2`
**roughly 15G of storage per release, per architecture**
Run Code Online (Sandbox Code Playgroud)

如何使用 apt-mirror 设置存储库

2. 结论

我发现这很困难,但在节省带宽方面非常有效,但另一方面,结果是磁盘空间的高消耗。


apt-cacher-ng

是一个缓存代理,用于从 Debian 风格的软件存储库(或可能来自其他类型)下载软件包。

主要原理是中央机器托管本地网络的代理,客户端配置他们的 APT 设置以通过它下载。Apt-Cacher NG 保留所有通过它的有用数据的副本,并且当发出类似的请求时,数据的缓存副本将被传送而无需重新下载。

Apt-Cacher NG 是作为 apt-cacher 的替代品从头开始设计的,但重点是在低系统资源需求的情况下最大化吞吐量。它也可以用作 apt-proxy 和 approx 的替代品,无需修改客户端的 sources.list 文件。

2. 结论

是专门用于 GNU/Linux 发行商的包文件的缓存代理,主要用于 Debian 和基于 Debian 的发行版(如 Ubuntu)。这意味着如果您的网络上有许多 Debian/Ubuntu 机器,您只需从 Internet 下载 deb 包(新软件、更新、发行版升级等)一次,其余的 Debian/Ubuntu 机器从Apt-Cacher NG 缓存,节省时间和互联网带宽。

下次你的任何机器需要一个 deb 包时,它会向 Apt-Cacher NG 请求它。如果任何其他机器之前询问过这个包,Apt-Cacher 将有一个副本并将其交付。否则,它将从 Internet 存储库中获取它,保留本地副本并交付它。

在 LAN 上缓存 apt 下载的最佳方法?Piskvor's answer

让我们在Full Circle Issue #54 中做一些营销,有一篇关于第 2 部分的有趣文章,Apt-Cache NG