Local-Repositories-Ubuntu

Ubuntu-Local-Repository Over LAN
=============================


# apt-get install apache2 dpkg-dev

# mkdir /RePo/debs/UB-Common
# mkdir /RePo/debs/i386
# mkdir /Repo/debs/amd64

# mkdir /var/www/debs

# ln -s /RePo/debs/UB-Common  /var/www/debs/ub-common
# ln -s /RePo/debs/i386  /var/www/debs/i386
# ln -s /RePo/debs/amd64  /var/www/debs/amd64

# find /Deb-Packages/ -iname *i386* -exec cp {} /RePo/debs/i386/ \;
# find /Deb-Packages/ -iname *amd64* -exec cp {} /RePo/debs/amd64/ \;
# find /Deb-Packages/ -iname *all.deb -exec cp {} /RePo/debs/UB-Common/ \;


# cd /var/www/debs
# dpkg-scanpackages ub-common | gzip -9c > ub-common/Packages.gz
# dpkg-scanpackages i386 | gzip -9c > i386/Packages.gz
# dpkg-scanpackages amd64 | gzip -9c > amd64/Packages.gz


Test it by pointing browser at 'http://Server-IP/debs'

Add new Packages to /RePo/debs/{UB-Common,i386,amd64} and
run dpkg-scanpackages

On Client Machine
----------------------------------


updating your /etc/apt/sources.list file

Remove/Copy the old sources.list file and create a new one
# vi /etc/apt/sources.list
deb http://IP_Address/debs/ ub-common/
deb http://IP_Address/debs/ i386/

#
# apt-get update