linux – 如何在CentOS上托管deb / apt repo?

前端之家收集整理的这篇文章主要介绍了linux – 如何在CentOS上托管deb / apt repo?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想为Ubuntu Precise制作一个木偶客户端及其依赖项的镜像,但是在我的CentOS 6主机上托管.

如果我做

cd /var/ftp
wget -A deb -r -np -nH --cut-dirs=1 http://apt.puppetlabs.com/pool/precise/dependencies/
wget -A deb -r -np -nH --cut-dirs=1 http://apt.puppetlabs.com/pool/precise/main/

然后在Ubuntu Precise上添加以下内容到/etc/yum.repos.d/mypuppet.repo

deb ftp://puppet.example.com precise main
deb ftp://puppet.example.com precise dependencies

然后我明白了

W: Failed to fetch ftp://puppet.example.com/dists/precise/dependencies/binary-amd64/Packages  Unable to fetch file,server said 'Failed to open file.  '

是否有关于如何在CentOS上托管deb / apt仓库的工具或指南?

解决方法

我说这个任务的适当工具是debmirror(1),它可以在CentOS存储库中找到.

确保从密钥服务器导入puppetlabs存储库的GPG密钥:

# gpg --recv-keys 1054B7A24BD6EC30
gpg: requesting key 4BD6EC30 from hkp server pool.sks-keyservers.net
gpg: key 4BD6EC30: public key "Puppet Labs Release Key (Puppet Labs Release Key) <info@puppetlabs.com>" imported
gpg: 3 marginal(s) needed,1 complete(s) needed,classic trust model
gpg: depth: 0  valid:   3  signed:   4  trust: 0-,0q,0n,0m,0f,3u
gpg: depth: 1  valid:   4  signed:   6  trust: 3-,1f,0u
gpg: depth: 2  valid:   1  signed:   1  trust: 1-,0u
gpg: next trustdb check due at 2014-05-11
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

然后,从他们的存储库中获取包:

# debmirror --check-gpg --keyring=/path/to/keyring.gpg --method=http \ 
  --root=/ --arch amd64 --dist precise --section main,dependencies   \
  --nosource --host apt.puppetlabs.com --progress /path/to/local/repo

这样可以确保目录结构正确并且存在所有预期的文件.

猜你在找的Linux相关文章