So, Ubuntu 8.10 Intrepid Ibex releases today. As thousands try to upgrade/download ubuntu, the servers will be slower than usual. Heres one way to upgrade multiple PC to Intrepid Ibex. This also works for the daily updates. How the works is that One PC updates directly from ubuntu mirrors while the other PCs update from the first PC, saving bandwidth. (If packages installed on the PCs differ, they’ll be downloaded from the mirror that the server uses)
I’ll be referring to the main PC that updates from official mirrors as _server_ and the other PCs as _client_. Lets start.
———————— _Server_ Config —————————-
Open a terminal on the _server_ and type
sudo apt-get install apt-cacher apache2
(yep, you’ll need a webserver)
once thats done, open /etc/apt-cacher/apt-cacher.conf in a text editor and modify to your needs.
The default port is 3142. The only thing I modified was path_map which lets you use aliases for repository hostnames
My path_map looks something like this.
path_map = ubuntu archive.ubuntu.com/ubuntu ; partner archive.canonical.com/ubuntu ; ubuntu-security security.ubuntu.com/ubuntu ; lp-compiz ppa.launchpad.net/compiz/ubuntu ; google dl.google.com/linux/deb ; ubuntutweak ppa.launchpad.net/tualatrix/ubuntu
you can use full hostnames instead of aliases, but I prefer this.
Now you need to edit /etc/default/apt-cacher and set AUTOSTART to 1.
Now restart apt-cacher
sudo /etc/init.d/apt-cacher restart
Now update the repositories and upgrade your packages
sudo apt-get update
sudo apt-get upgrade
If you’re upgrading to Intrepid Ibex from Hardy Heron, Please Check http://www.ubuntu.com/getubuntu/upgrading
After the entire upgrade completes, run this command in terminal to import existing cached archives.
sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives
If it throws up an error, try
sudo /usr/share/apt-cacher/apt-cacher-import.pl -s /var/cache/apt/archives
———————— _Client_ Config —————————-
First Check if the Apt-cacher server is running by opening
http://repository-server:3142/report in your browser (‘repository-server’ here is the IP or hostname of the _server_ machine)
Then on the _client_ machines, open /etc/apt/sources.list
sudo gedit /etc/apt/sources.list
And change the mirror to your local server’s IP/hostname
for example:
(If you used path_map)
deb http://archive.ubuntu.com/ubuntu/ intrepid main restricted
changes to
deb http://repository-server:3142/apt-cacher/ubuntu intrepid main restricted
Note: replace ‘repository-server’ with your _server_’s IP or hostname (in my case 192.168.0.3)
Otherwise (If you didn’t use path_map) change it to:
deb http://apt-cacher-server/apt-cacher/archive.ubuntu.com/ubuntu/ intrepid main restricted
Do this for all lines in sources.list that you want to update via the apt-cache server.
now you can use apt-get just like before.
to upgrade to Intrepid Ibex from Hardy Heron, Check http://www.ubuntu.com/getubuntu/upgrading
and click on upgrade to ubuntu 8.10
Reference links (might help you with troubleshooting)
http://www.debuntu.org/how-to-set-up-a-repository-cache-with-apt-cacher
https://help.ubuntu.com/community/Apt-Cacher-Server
You can also upgrade using apt-p2p – Learn more on torrentfreak
And I also suggest you use bittorrent for downloading the Cd and DVD ISOs so that there is lesser stress on the mirrors. If you have to use the http/ftp mirrors, try using a local mirror or one close to your country.
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=10f5e9b8-07a6-4735-bc54-070a08c10900)


Recent Comments