Installing at a location with no internet access
Robert Heller
heller at deepsoft.com
Mon Jul 25 14:15:10 UTC 2022
At Mon, 25 Jul 2022 09:35:48 -0400 "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> Hi All,
>
> I have the thumbdrive with live-server for 20.04 LTS. No problem - good
> start.
>
> 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 ?
apt-get -s -d install whatever >script.sh
Then edit script.sh to make it into a script that looks like:
#!/bin/bash
wget -P thumb-drive-path http://repo/...
wget -P thumb-drive-path http://repo/...
...
Where the http:// strings are the ones generated by apt-get
and thumb-drive-path will be the path of a thumb drive on some other machine
with an internet connection. Put this script on a thumb drive and go to that
other machine and run the script. Return to the Internet-less machine and
copy all of the .deb files to its /var/cache/apt/archives/ directory, then run
the usual apt command (since all of the deb files are in the "cache", it won't
actually try to download anything, just install what has already been
"downloaded" to the cache). You could also set up a "mirror" machine and do a
apt-get -d install of the desired packages and then copy its
/var/cache/apt/archives/ directory to a thumb drive and copy those files to
the target's /var/cache/apt/archives/ directory.
Alternitively, you can use debmirror (on a machine with internet access) to
"mirror" a repo to a removable disk (eg a "large" USB drive), install apache
(see above) on the target machine and set it up as a repo mirror -- quick and
dirty: symlink /var/www/ to the USB mirror disk and make sure the .htaccess
and/or httpd.conf file allows for following symlinks, fire up apache, and
then specificy http://localhost/ as the repo to use (edit
/etc/apt/sources.list as needed). This latter option can be used to handle
updates, from time to time -- remirror the removable disk on the machine with
internet access and sneakernet it to the machine without internet acces,
(re)start apache and apt update/apt full-upgrade ...
>
> Thanks,
>
> Jerry
>
--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list