How to automatically find the fastest source of updates in Debian and how to modify the source

Source: Internet
Author: User

Release for Debian Wheezy (7.0)

One. Ensure an available source, here recommend USTC Open source Mirror station http://mirrors.ustc.edu.cn

Two. Modify the source

Execute Command vi/etc/apt/sources.list
And then

Modify the contents of the file as follows: Deb Http://mirrors.ustc.edu.cn/debian wheezy main Non-free contrib Deb http://mirrors.ustc.edu.cn/ Debian-security wheezy/updates main contrib non-free deb-src Http://mirrors.ustc.edu.cn/debian wheezy Main Non-freecontrib deb-src http://mirrors.ustc.edu.cn/debian-security wheezy/updates main contrib Non-free
After the modification is complete, save the exit
Execute command sudo apt-get update
Complete the source modification

Three. Automatically find the fastest source of updates
Execute command

Apt-get Install Apt-spy
the-D option in the apt-spy-d unstable-a asia-t 5 command line specifies the release version, such as stable, testing, unstable.
the-a option specifies the area of the Debian installation source server, such as Asia, Europe, North-america, and so on.
These zone information is stored in the/etc/apt-spy.conf document, and if you want to test all servers, you can also replace the specific area with the all key. The
-T option specifies the connection timeout threshold, the threshold in seconds, and the setting of smaller thresholds to effectively improve the test speed and ignore slow servers.
when the test is complete, Apt-spy automatically creates the/etc/apt/sources.list.d folder and creates the Apt-spy.list file inside it.
so the apt-spy.list copy to the/etc/apt/sources.list file, you can find the source used, remember to back up your original sources.list file.
You can then update the mirror site with Apt-get update

Apt-spy [options] Option:-
D Distribution Select the release version of Debian, such as stable. This parameter must be used in addition to upgrades. -
A area selects areas for testing, such as AISA.
-C config To specify the configuration file.
-E number Specifies how many servers to test. -
F file to crawl the file (relative to the path of the Debian base) when you test. -I
specifies the input file to use with the-w parameter.
-M mirror-list Specifies the mirrored list file to be upgraded.
the-o output-file redirects output to the specified file. -
p proxy Specifies the proxy server to use, which needs to conform to the format of [Server]:[port]. -
s country_list specifies the country to be tested. cannot be used concurrently with the-a parameter. -
t time specifies that the timeout for each server is only a positive integer when testing. -
u update-url gets the mirror list update from the specified URL. The
first few mirror servers in the server list provided by the-W file output-I parameter (the default is the first 5 units). -
n number to set the server quantity for the-w parameter output.
-V Output version information. -H Output Current help information





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.