Package mirrors
When installing or updating packages using a package manager, a package repository is used to get a list of all available packages and to download those packages. Package mirrors are replicas of these package repositories. Akamai offers public package mirrors for Ubuntu, Debian, and CentOS. Since our mirrors are hosted in every data center, responses and downloads are typically much faster than using other public mirrors.
By default, all new Linodes use our package mirrors. No additional configuration is required.
Package mirror settings
For best performance, you will want to use the mirror in the same data center as your Linode. When using the our DNS resolvers, mirrors.linode.com will resolve to the mirror within the same data center. For public queries, mirrors.linode.com will return a round robin of the US locations.
Instructions for setting the package mirror location are provided in the following subsections.
Ubuntu system settings
For a Ubuntu system follow the instructions below:
-
Edit the
sources.listfile with the following command:sudo nano /etc/apt/sources.list -
Replace the line containing the address http://us.archive.ubuntu.com/ubuntu/ with the new address location:
http://mirrors.linode.com/ubuntu/ -
Do not modify lines containing the address http://security.ubuntu.com/ubuntu/. These lines contain security updates for packages.
-
Save and exit the
sources.listfile.
Debian system settings
For a Debian system follow the instructions below:
-
Edit the
sources.listfile with the following command:sudo nano /etc/apt/sources.list -
Replace the line containing the address http://ftp.us.debian.org/debian/ with the new address location:
http://mirrors.linode.com/debian/ -
Do not modify lines containing the address http://security.debian.org/. These lines contains security updates for packages.
-
Save and exit the
sources.listfile.
CentOS system settings
For a CentOS system follow the instructions below:
-
By default,
yumwill try using fastest mirror available. This need to be disabled to use our mirror. Edit thefastestmirror.conffile with the following command:sudo nano /etc/yum/pluginconf.d/fastestmirror.conf -
Change the
enabled=variable to 0:... enabled=0 ... -
Save and exit the
fastestmirror.conffile. -
Edit the
CentOS-Base.repofile with the following command:sudo nano /etc/yum.repos.d/CentOS-Base.repo -
Comment each
mirrorlistline by adding the # sign before each line. -
Uncomment each
baseurlline by removing the # sign before each line. -
Edit all
baseurllines containing the addresshttp://mirror.centos.org/centos/$releasever/os/$basearch/to reflect the new address location:http://mirrors.linode.com/centos/$releasever/os/$basearch/ -
Save and exit the
CentOS-Base.repofile.
Updated about 1 year ago
