Installing at a location with no internet access
Little Girl
littlergirl at gmail.com
Tue Jul 26 19:14:28 UTC 2022
Hey there,
Jerry Geis wrote:
>But then I "add" packages... (typicallly) and just use apt-get to
>install those - but what or how do you get those packages if the
>server has "no" internet connection?
>
>Is there a "download" that has the "full" ubuntu ? how does one get
>the other packages installed ?
I haven't tried this stuff below, but these are notes that I've made
for myself in my personal wiki in case I ever need to do that.
====================
Figure out which .deb files you'll want for your repository:
Unless you already know exactly which packages you'll want to
install, the information on this page might help to generate a list
of manually-installed (non-default) packages on a machine that's
already set up with the software you prefer:
https://askubuntu.com/questions/2389/how-to-list-manually-installed-packages
Alternatively, unless this is unreliable for housekeeping reasons,
the /var/cache/apt/archives directory should already contain .deb
files of all the installed (and previously-installed and uninstalled)
packages for your system because Ubuntu keeps them in case you ever
need them again.
====================
Get specific .deb files if you don't already have them for your
repository:
If a specific .deb file is missing from the /var/cache/apt/archives
directory, you can manually add it and its dependencies with this
command, replacing foo with the package name:
sudo apt-get --download-only install foo
Or if several specific .deb files are missing from the archive, you
can use a similar command with all of their package names to add them
all at once (replacing foo and bar and baz with actual package names
in this example):
sudo apt-get --download-only install foo bar baz
[aside]
Note that you may be able to use apt instead of
apt-get in those commands, but I wasn't able to find
the --download-only option or anything like it in the
apt man page or by using the apt --help command. If
it's an available option, it should be documented.
[/aside]
Or, if you'd like to start fresh and control exactly what's in the
/var/cache/apt/archives directory, you can run this command to empty
it and then use the command above to manually add packages to it.
sudo apt clean
WARNING: USE THAT COMMAND WITH CAUTION ONLY IF
YOU'RE SURE YOU WANT TO BE RID OF ALL THE FILES
Another way to get .deb files is by using the Ubuntu Packages Search
page to find specific packages and download their .deb files:
https://packages.ubuntu.com/
====================
Add and use the .deb files:
You can copy all of those .deb files into the /var/cache/apt/archives
directory on the machine that has no internet access and use its
package manager normally to install them.
Or you can create a personal repository to hold all of your .deb
files and give you access to them:
https://help.ubuntu.com/community/Repositories/Personal
Note that this page says that it's not intended to be used with a
whole lot of files, but I don't see why it couldn't and the link it
sends you to as a recommended alternative is impossible for me to
make sense of and you may feel the same way.
====================
--
Little Girl
There is no spoon.
More information about the ubuntu-users
mailing list