Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Redirecting apt sources to address increased load: A Guide to Using Community Mirrors

Дата публикации: 17-04-2026 18:37:20


Problem
The default Ubuntu package configuration points to the global archive repository. To improve performance, you can choose from a list of regional mirrors to download from.
Solution
In order to improve the distribution of load across different regions, it is recommended to utilize a local or community-based mirror. Beyond setting up mirrors, systems may attempt to download certain packages from the -security pocket rather than -updates due to package pinning priorities. Large packages, such as linux-firmware, which can often exceed 1GB in size, are sometimes available in both -security and -updates.
To help reduce the load on the security infrastructure and ensure the package is sourced from the correct mirror, you can configure your system to explicitly pull such packages from the -updates pocket.
The following steps will guide you to set up your system to do this.
Modify your apt sources lists to point to a local, regional mirror
The following steps are using Noble as an example of the Ubuntu release being used. Please adjust to the release running in your system (Focal, Jammy, Noble, Resolute, etc)
Back up your current apt sources files
sudo cp /etc/apt/sources.list.d/ubuntu.sources \
/etc/apt/sources.list.d/ubuntu.sources.$$
sudo cp /etc/apt/sources.list /etc/apt/sources.list.$$
This will copy your current sources to numbered backup, so you can revert or restore later as needed.
Use the following list to choose a mirror that is regionally close to you:
https://launchpad.net/ubuntu/+archivemirrors
Click on the mirror you would like to use, and it will provide you with the URL that can be used to configure your apt sources. Note that it will need to take into account the Ubuntu release you are using, as well as the protocol offered by the mirror, which can be http, https, ftp or rsync. Note the URL as that will be needed in the next step.
Replace your default sources with the following by specifying the mirror you would like to use:
For sources.list
deb <protocol>://<url>/ubuntu noble main restricted universe multiverse
As an example, it could be:
deb http://es.archive.ubuntu.com/ubuntu noble main restricted universe multiverse
For sources.list.d/ubuntu.sources (deb822 format)
Types: deb
URIs: <protocol>://<mirror_url>/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: <protocol>://<mirror_url>/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
As an example, it could be:
Types: deb
URIs: http://es.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: http://es.archive.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Update apt package metadata:
sudo apt update
Related documents
Documentation:
Apt Pinning Howto
Deb822 Format
2 posts - 2 participants
Read full topic

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Temporary performance degradation on Ubuntu archive07.317-04-2026
2Ubuntu 26.04 ("Resolute Raccoon") LTS released014.0323-04-2026
3Ubuntu 26.04 LTS (Resolute Raccoon) Beta released07.8826-03-2026
4Stonking Snapshot 2 released011.6525-06-2026
5Fixes available for CVE-2026-31431 (Copy Fail) Linux Kernel Local Privilege Escalation Vulnerability07.8401-05-2026
6Infrastructure outage07.115-07-2026
7Stonking Snapshot 1 released011.2829-05-2026
8Update concerning DDOS attack on Canonical and Ubuntu013.0701-05-2026
9Ubuntu Linux Looking To Get Rid Of /etc/debian_version Historical Artifact07.424-07-2026
10Default Ubuntu dist just changed to Focal? Need a libssl 1.x0505-08-2025

Классификация: . Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 7.3. Источник: discourse.ubuntu.com.