如何搭建一个自己的ubuntu软件源啊?
我看了几篇文章,大概总结出是这样的,也不知道对不对
搭建一个web服务,开启列表功能,即nginx的autoindex on;
,假设根目录下有一个soft目录,里面保存了一些*.deb文件
sudo apt-get install -y dpkg-dev
sudo dpkg-scanpackages soft | gzip > soft/Packages.gz
得到软件源地址deb http://192.168.1.20:6666 soft
其中不明白的是
deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]
component1及后面的参数到底有什么用,我看官方的软件源结构不像是目录结构
我参考了https://odzangba.wordpress.co...
结果很多问题
sudo apt-get update
获取:1 file:/home/zc/repository/disk_1 InRelease
忽略:1 file:/home/zc/repository/disk_1 InRelease
获取:2 file:/home/zc/repository/disk_1 Release
忽略:2 file:/home/zc/repository/disk_1 Release
获取:3 file:/home/zc/repository/disk_1 Packages
忽略:3 file:/home/zc/repository/disk_1 Packages
获取:4 file:/home/zc/repository/disk_1 Translation-zh_CN
忽略:4 file:/home/zc/repository/disk_1 Translation-zh_CN
获取:5 file:/home/zc/repository/disk_1 Translation-zh
忽略:5 file:/home/zc/repository/disk_1 Translation-zh
获取:6 file:/home/zc/repository/disk_1 Translation-en
忽略:6 file:/home/zc/repository/disk_1 Translation-en
获取:3 file:/home/zc/repository/disk_1 Packages
忽略:3 file:/home/zc/repository/disk_1 Packages
获取:4 file:/home/zc/repository/disk_1 Translation-zh_CN
忽略:4 file:/home/zc/repository/disk_1 Translation-zh_CN
获取:5 file:/home/zc/repository/disk_1 Translation-zh
忽略:5 file:/home/zc/repository/disk_1 Translation-zh
获取:6 file:/home/zc/repository/disk_1 Translation-en
忽略:6 file:/home/zc/repository/disk_1 Translation-en
获取:3 file:/home/zc/repository/disk_1 Packages
忽略:3 file:/home/zc/repository/disk_1 Packages
获取:4 file:/home/zc/repository/disk_1 Translation-zh_CN
忽略:4 file:/home/zc/repository/disk_1 Translation-zh_CN
获取:5 file:/home/zc/repository/disk_1 Translation-zh
忽略:5 file:/home/zc/repository/disk_1 Translation-zh
获取:6 file:/home/zc/repository/disk_1 Translation-en
忽略:6 file:/home/zc/repository/disk_1 Translation-en
获取:3 file:/home/zc/repository/disk_1 Packages [1,154 B]
获取:4 file:/home/zc/repository/disk_1 Translation-zh_CN
忽略:4 file:/home/zc/repository/disk_1 Translation-zh_CN
获取:5 file:/home/zc/repository/disk_1 Translation-zh
忽略:5 file:/home/zc/repository/disk_1 Translation-zh
获取:6 file:/home/zc/repository/disk_1 Translation-en
忽略:6 file:/home/zc/repository/disk_1 Translation-en
获取:4 file:/home/zc/repository/disk_1 Translation-zh_CN
忽略:4 file:/home/zc/repository/disk_1 Translation-zh_CN
获取:5 file:/home/zc/repository/disk_1 Translation-zh
忽略:5 file:/home/zc/repository/disk_1 Translation-zh
获取:6 file:/home/zc/repository/disk_1 Translation-en
忽略:6 file:/home/zc/repository/disk_1 Translation-en
获取:4 file:/home/zc/repository/disk_1 Translation-zh_CN
忽略:4 file:/home/zc/repository/disk_1 Translation-zh_CN
获取:5 file:/home/zc/repository/disk_1 Translation-zh
忽略:5 file:/home/zc/repository/disk_1 Translation-zh
获取:6 file:/home/zc/repository/disk_1 Translation-en
忽略:6 file:/home/zc/repository/disk_1 Translation-en
W: 仓库 “file:/home/zc/repository/disk_1 Release” 没有 Release 文件。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
apt-cache search mypackage
空的
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
后面的参数表现的形式其实就是反应到目录结构上。通常很少有软件仓库把目录层级搞的这么深的,因此你很少会看到component参数,基本上只有官方仓库你会看到后面一堆component.
可以参考这2篇文章How to create a local mirrors和制作完整的Ubuntu本地源镜像,主要用到apt-mirror。