Set Source
Because most sources are not very stable, that is, a certain degree of timeliness, and the speed of download is not necessarily guaranteed, so you can install and use Apt-spy to automatically test which source download speed fastest, and automatically write the fastest source to the configuration file. For details on Apt-spy, see the comments at the end of the article. Set temporary source
# Enter the following command in the Terminal of root permission
vi/etc/apt/sources.list
# Add the following line to Sources.list:
deb http:// Http.us.debian.org/debian Stable Main
Update the package list and install Apt-spy
# Enter the following command in Terminal under root permission, update the package list and install Apt-spy
apt-get update
apt-get install Apt-spy
Automatically download lists and use Apt-spy to test the fastest source
# Enter the following command in the Terminal under root permission
#-D Distribution Select the release version of Debian, such as stable. In addition to upgrades, you must use this parameter
#-a area to select areas for testing, such as AISA.
#-C config Specifies the configuration file.
apt-spy update
apt-spy-d stable-a asia-t 3
View the generated configuration file
# Enter the following command in the Terminal under root permission
cat/etc/apt/sources.list.d/apt-apt.list
Delete the temporary source you just set up, as follows
/etc/apt/sources.list
Update package List
# Enter the following command in the Terminal under root permission
apt-get update
Install the basic development environment
# Enter the following command in the Terminal under root permission
# Install the C + + development package
Apt-get install build-essential
# install Vim editor (personal hobby)
Apt-get Install VIM
# If you are installing a system in a virtual machine, in general, you will need to have the system pre-installed made and the Linux header when installing Vm_tools. (Make or GCC has been installed in the build-essential package, skip)
Apt-get Install linux-headers-$ (uname-r)
# installation Vm_tools If the permission is still not enough to be denied under root permission, you can enter the following command in the appropriate directory to elevate the permissions
chmod +x. Install
# Or
chmod 777./install
Note 1,apt-spy configuration information
#sudo apt-get Install apt-spy
#sudo mv/etc/apt/sources.list/etc/apt/sources.list.bak//backup
#man apt-spy// Get detailed usage
#sudo apt-spy Update//Update your mirrored list file/var/lib/apt-spy/mirrors.txt
#sudo apt-spy-d testing-a Asia
/ /Find the fastest testing version of the image in Asia and generate sources.list files, or use the-o parameter to specify the write file
Apt-spy is a program that manages installation media, using a simple introduction:
How to: Apt-spy [ Options]
option:-
D Distribution Select a 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.
Update to upgrade the list of mirrored sites.
the use of CAT commands in the note 2,linux
# cat has three main functions:
# 1. Displays the entire file
at once $ cat filename
# 2. Create a file from the keyboard, you can only create new files, you cannot edit existing files
$ cat > FileName
# 3. Will Several files merged into one file
$ cat file1 file2 > file
# Cat specific command format: Cat [-ABEENSTTUV] [--help] [--version] filename
above