Archive

Posts Tagged ‘repo’

Local Repository Ubuntu/Debian

September 4, 2010 Leave a comment

Sometimes we dont want download all needed packages from web and installing each deb file and all dependencies disturb us.
We need a apt-get repository locally in example on USB disk, i show how make it.
first we need dpkg-dev package:

sudo apt-get install dpkg-dev

next we need a folder in example /home/user/REPO
and all debs file we need put to that folder.

cp /var/cache/apt/archives/*.deb /home/user/REPO/

or move it:

sudo mv  /var/cache/apt/archives/*.deb /home/user/REPO/

Now we need to build an index of all packages (Packages.gz)

cd /home/user/

sudo dpkg-scanpackages REPO /dev/null | gzip > REPO/Packages.gz

Our repository is ready to add to sources.list
Add below line to begin of /etc/apt/sources.list

deb file:/home/user REPO/

And update a packages by sudo apt-get update

Sometimes apt download files from web instead take it locally.

To avoid this add below lines to /etc/apt/apt.conf (create it probably not exist yet)

APT {
Get {
AllowUnauthenticated “true”;
};
};

Thats should be all. 🙂

Advertisements
Categories: Uncategorized Tags: , , ,