3

I have an existing Ubuntu 12.04 server, with all the packages that I need in /var/cache/apt/archives.

I have a fresh install of 12.04 at a customer site with (deliberately) no internet access.

How can I install all the packages I need (from the first machine's apt archive), without messing up apt on the second machine. (It may gain internet access later.) I have a USB drive.

Will installing with dpkg do the job? Would that mess up apt for future package installs? How would I get the order of installing 100+ packages correct?

2 Answers 2

2

You can simply copy all the .deb packages and install them with dpkg:

sudo dpkg -i *.deb

There isn't any danger unless you forget some package or have the same package but with different versions. I would use APTonCD, or Apt-mirror, or AptMedium as the safest methods.

There are a bunch of them in either:

0
2

FIrst, I would use one of the tools Braiam described to put the the packages from the first server in a local repository on the second server. Next, I would run dpkg --get-selections on the first server, and feed it's output to dpkg --set-selections on the second server; that will mark software to be installed. FInally, I would run apt-get dselect-upgrade on the second server to peform the installation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .