1

This question already has an answer here:

Assuming that I have a server with Ubuntu server newly installed on it. I was thinking of installing the very same version on Virtual Box (Or any other virtualization software), connect it to the internet and use apt-get to only download the packages for upgrading the system and the new software such as (tomcat7, openjdk6-default-headless..etc). Then copy the downloaded packages from the archive folder to the offline server's archive folder through a USB stick.

So now the virtual system won't actually be upgraded nor have any new software installed. But would running the very same apt-get commands on the offline system without the download directive -d be executed without issues ?

*EDIT:*This needs to be as simple as possible because I'll have to write a guide for our client to do this on his own and so it won't be acceptable to require deep Linux knowledge to do this.

marked as duplicate by karel, Fabby, David Foerster, Kevin Bowen, waltinator Jun 20 '18 at 4:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

An Easy solution for your need would be apt-on-CD. Get the packages from a machine which has access to internet. Then use aptoncd utility to create CD/media for install in your machine.

For more details visit this link which details the process

and this question and answers in askubuntu itself.

2

I once had a similar problem. I solved it using apt-mirror. With that it is possible to mirror a whole repository onto a external hard drive an then install from that hard drive on your offline machine.

Upsides

  • Once configured you can install packages as you were used to.
  • Espacially dependencies are resolved comfortably.
  • You can easily do updates by first updating the mirror files and then updating on your offline machine.

Downsides

  • You need a lot external hard drive space (about 35gb).
  • Mirror must be configured first. May not be suitable for beginners.
  • Initital creation of mirror takes some time.

If you want to give it a try this tutorial seems to be quite good. Can't find the one I used back then.

  • I have to write an installation guide for my client to install the needed software on his own. So this needs to be as simple as copying files somewhere and running few commands. Downloading a whole repository would definitely be rejected from their side. Thanks anyway :) – Muhammad Gelbana Sep 1 '12 at 11:59
1

I'm not sure if I understood your question correctly, but if you are looking for ways to install/update software without an internet connection, there are several methods listed here:

https://help.ubuntu.com/community/InstallingSoftware#Installing_packages_without_an_Internet_connection

I used the synaptic save package download script trick quite a few times and tried out keryx as well. However, it was usually just for installing new software, not upgrading software.

By offline server, do you mean a server accessible to a LAN cut off from the rest of the internet?

  • Yes. By offline server I mean a server has access to the LAN but without and Internet connection. Thank you. – Muhammad Gelbana Sep 1 '12 at 13:43
0

you can install downloaded deb packages manually using

    sudo dpkg -i package.deb

or

    sudo dpkg -i *.deb

note that if you do not want to install all packages downloaded and installed on machine A also on machine B then you need to keep track of the order in which you downloaded and installed them, because due to dependencies, if you want to install the 10th package you installed on machine A also on machine B, you may also need to install one or more or all of packages 1 through 9.

Not the answer you're looking for? Browse other questions tagged or ask your own question.