2011-07-04 158 views
3

在这里,我想要的是: 我想开发我的项目的debian软件包用于离线安装。 项目包含像python-lxml等一些依赖项。我已经从具有互联网连接的不同机器下载了所需的软件包。现在在另一台机器上(它没有互联网连接),我想在执行控制文件之前将所有必需的软件包复制到“/ var/cache/apt/archive”文件夹(从debian软件包安装)。所以当控制文件被执行时,它可以从“/ var/cache/apt/archive”文件夹安装依赖包,而不是在互联网上搜索。如何为离线安装创建debian软件包?

我需要应用哪些更改以及哪些文件?或者是否有任何其他建议来创建脱机安装包?

谢谢!

回答

2

惊人的,短短的几秒钟前,我建议apt-offline一位同行堆:

Description: offline apt package manager 
apt-offline is an Offline APT Package Manager 
. 
apt-offline can fully update and upgrade an APT based distribution without 
connecting to the network, all of it transparent to apt 
. 
apt-offline can be used to generate a signature on a machine (with no network). 
This signature contains all download information required for the apt database 
system. This signature file can be used on another machine connected to the 
internet (which need not be a Debian box and can even be running windows) to 
download the updates. 
The downloaded data will contain all updates in a format understood by apt and 
this data can be used by apt-offline to update the non-networked machine. 
. 
apt-offline can also fetch bug reports and make them available offline 
+0

谢谢,很高兴知道的apt-下线,我已阅读[链接](HTTP://手册页。 ubuntu.com/manpages/lucid/man8/apt-offline.8.html)了解更多细节,但我仍然感到困惑,我如何在debian创建中使用它,因为我希望所有的过程都应该在安装时从debian包中完成。 – Yajushi

+0

阿哈,那确实是一个不同的目标;对于我的新安装,我通常使用最小的“网络安装光盘”,我可以找到 - 我真的只想要内核,一个shell和apt-get,所以我可以运行apt-get install i3 vim openssh-服务器irssi firefox ...'以及其他我需要的程序。你可以做同样的事情,或者使用['chef'](http://www.opscode.com/chef/),['puppet'](http://www.puppetlabs.com/)或[ FAI](http://wiki.debian.org/FAI)来管理部署。 – sarnold