ubuntu aptly local repo apt

#####主要是搭建自己的软件仓库

  • 需求
  1. ubuntu precise 系统

  2. aptly 软件

1
2
3
4
5
6
7
8
9
10
11
12
# ubuntu 和debian 的对照
15.04 jessie / sid
14.10 jessie / sid
14.04 jessie / sid
13.10 Wheezy / sid
13.04 Wheezy / sid
12.10 Wheezy / sid
12.04 Wheezy / sid
11.10 Wheezy / sid
11.04 Squeeze / sid
10.10 Squeeze / sid
10.04 Squeeze / sid
  • 安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#This is repository for aptly tool.
#To install aptly, add new repository to /etc/apt/sources.list:
deb http://repo.aptly.info/ squeeze main
#And import key that is used to sign the release:
$ gpg --keyserver keys.gnupg.net --recv-keys 2A194991
$ gpg -a --export 2A194991 | sudo apt-key add -
After that you can install aptly as any other software package:
$ apt-get update
$ apt-get install aptly
#Don't worry about squeeze part in repo name: aptly package should work on Debian squeeze+, Ubuntu 10.0+. Package contains aptly binary, man page and bash completion.
  • 配置
  1. 创建私有仓库
1
2
aptly repo create -distribution=wheezy testing-wheezy
  1. 向仓库中添加deb
1
2
aptly repo add -remove-files testing-wheezy incoming/*.deb
  1. 发布仓库
1
2
aptly publish repo -skip-signing=true testing-wheezy #这里有一个签名问题。一直没有搞明白 先放过
  1. 删除仓库中的deb包
1
2
aptly repo add -remove-files testing-wheezy incoming/*.deb
  1. 更新仓库中的包
1
2
aptly publish update wheezy
  1. 启动服务
1
2
aptly serve
  • 后续

这个还有mirror 远程repo 的 然后合并做成快照一并发布。。让系统只有一个安装源

这个工具应该是现在比较好的deb 包管理工具吧