I have a host Ubuntu 13.10 system in which I am installing packages via
Now there are many virtual machines which run on top of this host machine.
I want these virtual machines to install from already downloaded packages by the host machine and skip going to the internet first to save my time.
I want to share only which I need and I want to download only once in my host machine.
Solution:
apt-cacher-ng
This creates a proxy that packages are downloaded only once and all machines can quickly download from it.
Here are the install steps
On my base host machine where i want to create apt-cacher-ng proxy
sudo apt-get install apt-cacher-ng
Open the browser to see that its installed successfuly
http://myip:3142
For me its
http://nanak-p570wm:3142
Now i all client machines including the host machine tell them to use proxy to get the packages
touch /etc/apt/apt.conf.d/01proxy
cat > /etc/apt/apt.conf.d/01proxy <<EOF
Acquire::http { Proxy "http://nanak-P570WM:3142"; };
Acquire::ftp { Proxy "ftp://nanak-P570WM:3142"; };
EOF
Thats it , try to test by downloading few things and see the magic
References
http://linuxexpresso.wordpress.com/2011/02/13/howto-apt-cacher-ng-on-ubuntu/
http://www.ubuntugeek.com/apt-cacher-ng-http-download-proxy-for-software-packages.html
apt-get install
Now there are many virtual machines which run on top of this host machine.
I want these virtual machines to install from already downloaded packages by the host machine and skip going to the internet first to save my time.
I want to share only which I need and I want to download only once in my host machine.
Solution:
apt-cacher-ng
This creates a proxy that packages are downloaded only once and all machines can quickly download from it.
Here are the install steps
On my base host machine where i want to create apt-cacher-ng proxy
sudo apt-get install apt-cacher-ng
Open the browser to see that its installed successfuly
http://myip:3142
For me its
http://nanak-p570wm:3142
Now i all client machines including the host machine tell them to use proxy to get the packages
touch /etc/apt/apt.conf.d/01proxy
cat > /etc/apt/apt.conf.d/01proxy <<EOF
Acquire::http { Proxy "http://nanak-P570WM:3142"; };
Acquire::ftp { Proxy "ftp://nanak-P570WM:3142"; };
EOF
Thats it , try to test by downloading few things and see the magic
References
http://linuxexpresso.wordpress.com/2011/02/13/howto-apt-cacher-ng-on-ubuntu/
http://www.ubuntugeek.com/apt-cacher-ng-http-download-proxy-for-software-packages.html
No comments:
Post a Comment
Please share your views and comments below.
Thank You.