Mainland China's niche cloud host Debian system replaces software source image to optimize download speed

888u

Last update at :2024-05-15,Edit by888u

Large-scale cloud host merchants in mainland China such as Tencent Cloud, Alibaba Cloud, and Huawei Cloud generally do not have this problem, but some relatively niche cloud hosts in mainland China often encounter problems, such as slow downloading and updating software. If the pre-installed system does not select the appropriate software source image based on the location, it is recommended to manually modify the Debian software source image to speed up the process. This article will guide novice users to change software sources, hoping to be helpful to users.

Mainland China Debian software source mirror

Lists several commonly used Debian software source images in mainland China. Click here to view the complete mirror node.

Mirror node Mirror address
Debian http://ftp.cn.debian.org/debian/
Alibaba Cloud http://mirrors.aliyun.com/debian/
Huawei Cloud http://mirrors.aliyun.com/debian/
NetEase http://mirrors.163.com/debian/
Tsinghua University http://mirrors.tuna.tsinghua.edu.cn/debian/
USTC http://mirrors.ustc.edu.cn/debian/
Lanzhou University http://mirror.lzu.edu.cn/debian/

Replace the Debian software source image

Before proceeding, rename the backup software source configuration file so that it can be restored if necessary.

mv /etc/apt/sources.list /etc/apt/sources.list.bak

Create a new configuration file.

vi /etc/apt/sources.list

The content is as follows (usually you only need to modify the release code and mirror address as needed, please refer to the following remarks for details).

deb http://ftp.cn.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ buster main contrib non-free
deb http://ftp.cn.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://ftp.cn.debian.org/debian-security/ buster/updates main contrib non-free
deb http://ftp.cn.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ buster-updates main contrib non-free
deb http://ftp.cn.debian.org/debian/ buster-backports main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ buster-backports main contrib non-free

Introduce the meaning of parameters in the configuration content one by one:

  • deb: binary software package;
  • deb-src: source code package;
  • URL: Software package mirror address;
  • Release version code: applicable to the software package corresponding to the release version, you can use the lsb_release -c command to query the code name;
  • The release codename follows the parameters: package type (xxxxx/updates for security bug updates, xxxxx-updates for normal maintenance updates, xxxxx-backports Backporting software packages, porting newer software patches to older versions of software);
  • main: free software following DFSG standards;
  • contrib: free software that follows the DFSG standard, but has non-free dependencies;
  • non-free: software that does not comply with DFSG standards;

Rebuilding the software package index will take effect after updating the configuration file.

apt-get update

If you are using the https software source mirror address, you need to ensure that the following two softwares are installed.

apt-get install apt-transport-https ca-certificates

Recommended site searches: domain name registration website query, website space rental, free space application, me domain name, domain name query official website, US website server, IP address search, cloud host, IP check, Korean independent server,

Mainland China's niche cloud host Debian system replaces software source image to optimize download speed

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码