Pages

Friday, November 7, 2014

Ubuntu: apt-get Install From an Existing Cache

The below can be use as a way to initially download .deb packages then install it to other Ubuntu machines without the need of internet connection anymore.

Create the cache directory
mkdir /vg/tool/os/ubuntu/aptget_cache_14.4.1LTS/imagemagick
Create your own configuration file to be used and set-up the archive directory.
# /vg/tool/os/ubuntu/apt1.conf
Dir::Cache::Archives /vg/tool/os/ubuntu/aptget_cache_14.4.1LTS/imagemagick;
Set-up environment
export APT_CONFIG=/vg/tool/os/ubuntu/apt1.conf
Verify settings
root@turaok:~# apt-config dump | grep -i Dir::Cache::archives
Dir::Cache::archives "/vg/tool/os/ubuntu/aptget_cache_14.4.1LTS/imagemagick";


Download the package.
apt-get --download-only install imagemagick

Copy the package to other server and set-up similar configuration file then install.
apt-get --no-download install imagemagick






No comments:

Post a Comment