Home > Linux > Ubuntu Local Repositry Creation

Ubuntu Local Repositry Creation

January 10th, 2009 Leave a comment Go to comments


    build-essential package

Steps For creating Local Repositry

Step1: Create two directory structures as

mkdir -p /Local_repositry/dists/hardy/main/binary-i386  and
mkdir -p /Local_repositry/pool/main

Step2: Store all  the .deb packages in /Local_repositry/pool/main

Step3: Now open the terminal and type

cd /Local_repositry

Step4: Now execute the below mentioned command

dpkg-scanpackages pool/main/ /dev/null > Packages (/dev/null  
repersents a override file which contains information about how the packeges  
fits into the distribution). 

Step5: Now execute the below mentioned command

cp Packages /Local_repositry/ dists/hardy/main/binary-i386/
gzip Packages
mv Packages.gz /Local_repositry/  dists/hardy/main/binary-i386/

Step6: Now edit your /etc/apt/sources.list file

deb file:///repositry/ hardy main
deb http://IP/ADD/of/REPO/SERVER/  hardy main
apt-get update

Now you can install any package from your local repositry.

If you want to add other packages to your repositry just copy your new .deb package in /Local_repositry/pool/main and repeat step 3,4 and 5. Then you will be able to install new package.

All the credit goes to scribd.com who provide such a good article

URL: www.scribd.com/doc/4753331/Creating-Local-Repository-In-Ubuntu

Categories: Linux Tags:
  1. David
    January 11th, 2009 at 11:04 | #1

    Nice documentation, it helps me a lot.

  1. No trackbacks yet.