Downloading from the main Ubuntu archive is slow even when it's not release day, how can I get apt-get to automatically use a mirror that is close to me?
|
|
I've always gone with the 'select best server' GUI tool: from Ubuntu Software Center, go to Edit -> Software Sources in the menu. (You can also do this from the Preferences for Synaptic or the Update Manager.) Under the Ubuntu Software tab there's a drop-down next to "Download from:" If you select "Other..." you'll get a button that says "Select Best Server"; clicking on it gets Ubuntu to run some tests to see what mirror will give the best download speed. I can't comment on whether this is better or worse than the method you found for yourself. Perhaps someone with some expertise on the issue can comment! Here are some screenshots for the graphical method, as Jorge suggested:
|
|||||||||||||||||
|
|
Here is a Python script I wrote that returns a list of mirrors with the lowest latency for a specified country. The script also provides bandwidth and status information taken from the mirrors' launchpad pages and will generate a new |
||||
|
|
|
I'm using Ubuntu Server 12.0.4 (precise pangolin). My problem was that apt-get was hanging anytime it tried to retrieve something from us.archive.ubuntu.com I added the below lines to the top of my /etc/apt/sources.list file (taken from @ajmitch answer above) and commented out everything else. This solved my problem and now install and update are working as expected.
|
|||||
|
|
apt-get now supports a 'mirror' method that will automatically select a good mirror based on your location. Putting:
on the top in your Lucid (10.04), Maverick (10.10), Natty (11.04), And Oneiric (11.10) users can replace |
|||||||||||||||||||||
|
|
A tip for users of Kubuntu 12.04... From Muon Software Centre:
Then on the Kubuntu Software tab:
This will select the server with the quickest ping (fastest server at the time) I'm in the UK, but my fastest server is "server for Nepal". - about 10 times faster than what I was getting with the default server for UK! |
|||
|
|
|
The Geographic location does not always give the best mirror. For example, I live in BC Canada, and most who are in this province should find a mirror in BC, California, or any Pacific state, maybe even Arizona. However, here in the north my ISP (unlike the phone company) has only one fiber line out of this city, and it goes straight to Calgary (1000km east of here) where it plugs a NEX shared with the line to ucalgary, where they have a lovely debian and ubuntu and who-knows-what-else mirror. It seems the university has the same ISP as I, and so transfer rates are measured in megabytes per second, as opposed to the 50-100 kilobytes per second I get from a default mirror. So. I recommend knowing your local internet network topology. Pretty things such as Network Exchanges can make for a fast connection to specific places. Staying on your ISP's network can bypass some speed throttles you might otherwise have to the outside world. Thanks to the post regarding the GUI tool to change this, I found that mirror and set it as default. Good show for this topic! |
|||||
|
|
For a fast upgrade, I've downloaded the alternate CD using torrents. After the upgrade in this way, I still ended up with a system which has still not all updates (probably after the ISO was packed). After a quick search, I ended up on the list of mirrors on Launchpad. Search for your country and test some. I live in the Netherlands and got only 75kB/s speed, much lower than my usual speed. The ubuntu.mirror.cambrium.nl mirror did not work for me, but ubuntu.mirror.astratoip.net did. Replace the mirror accordingly and run the below commands:
Replace |
||||
|
|
