-Поиск по дневнику

Поиск сообщений в lj_oio11

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 04.09.2011
Записей:
Комментариев:
Написано: 0


Installing packages without an Internet connection

Четверг, 15 Октября 2015 г. 15:37 + в цитатник
InstallingSoftware - Community Help Wiki

..
Installing packages without an Internet connection

Sometimes, an internet connection is unavailable to install programs.

It is possible to install programs without CDs or DVDs onto offline computers, using a simple USB key for example to transfer only the packages you need.

There are several methods to do this:

Use Keryx

Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source. You can get Keryx here: https://launchpad.net/keryx

Use the Synaptic package download script

Here's how: Synaptic/PackageDownloadScript

Short instructions:

  • Launch Synaptic on the offline computer
  • Mark the packages you wish to install
  • Select File->Generate package download script

  • Save the script to your USB key
  • Take the USB key to an online Linux computer and run the script there from the USB key. It will download only the packages required by the offline computer to the USB key.
  • Insert the USB key into the offline computer
  • Launch Synaptic and click on File->Add downloaded packages

  • Select the directory on your USB key containing the downloaded *.deb files and press Open. The packages will be installed.

Note: If you don't have access to a PC with GNU/Linux or emulating/virtualizing GNU/Linux (Cygwin, VMware, VirtualBox, Qemu, etc), just open the script with a text editor and enter all the URLs you see in your browser to download the corresponding packages.

If you have all the necessary libraries and/or dependencies, the simplest way is of course to just download the .deb package you need, just as you would with a Windows installer, and double-click the package to install it with GDebi.

All Ubuntu packages are available on http://packages.ubuntu.com/ and http://www.debian.org/distrib/packages .

Use Offline apt-get update

If you can't even select the packages on your offline PC because you can't add the repository / update the package info, try this: AptGet/Offline/Repository

Basically, it consists in creating your own local repository, except that it won't contain the packages themselves, only the dependency information.

The problem is that when you generate the package download list using this method, it will try to get the packages from your local repository and obviously fail.

The solution is to post-process the script by replacing the URLs with the correct one.

Assuming you created the local repository at "/home/username/repository" and got the different files from "http://archive.ubuntu.com/ubuntu/", this can easily be done with the following command:

sed 's#file:///home/username/repository#http://archive.ubuntu.com/ubuntu#' download_script.sh > download_script2.sh
chmod +x download_script2.sh

or directly without creating a second script:

sed -i 's#file:///home/username/repository#http://archive.ubuntu.com/ubuntu#' download_script.sh

or simply with any text editor featuring search&replace.

See also: AptGet/Offline.

Use apt-offline

apt-offline allows you to easily upgrade or install new packages on your offline PC, by using another online PC.

sudo apt-get install apt-offline

Upgrading

  1. On the offline PC:

sudo apt-offline set /tmp/apt-offline.sig
  1. On the online PC:

sudo apt-offline get C:\apt-offline.sig --bug-reports --threads 5
  1. On the offline PC:

sudo apt-offline install /media/USB/apt-offline.zip

Installing

  1. On the offline PC:

sudo apt-offline set abuse-offline.sig --install-packages abuse --src-build-dep --install-src-packages abuse 
  1. On the online PC:

sudo apt-offline get abuse-offline.sig --no-checksum --bundle abuse-offline.zip 
  1. On the offline PC:

sudo apt-offline install /media/USB/abuse-offline.zip

More info


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

http://oio11.livejournal.com/2124485.html

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку