Linode Library Home
Linode Library RSS Feed
Home
Print View View Source

Package Mirrors

Published: by

Linode offers public package mirrors for Ubuntu, Debian, and CentOS. When you install updates and new packages, you must download them from package mirrors. The primary advantage of using the Linode package mirrors versus other public package mirrors is speed. Linode package mirrors are available in all six of our datacenters. The mirrors can be found at:

Contents

Package Mirror Settings

For best performance, you will want to use the mirror in the same datacenter as your Linode. When using the Linode DNS resolvers, mirrors.linode.com will resolve to the mirror within the same datacenter. 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:

  1. Edit the sources.list file with the following command:

    sudo nano /etc/apt/sources.list
    
  2. Replace the line containing the address http://us.archive.ubuntu.com/ubuntu/ with the new address location:

    http://mirrors.linode.com/ubuntu/

  3. Edit all lines containing the address http://security.ubuntu.com/ubuntu/ to reflect the new address location:

    http://mirrors.linode.com/ubuntu/

  4. Save and exit the sources.list file.

Debian System Settings

For a Debian system follow the instructions below:

  1. Edit the sources.list file with the following command:

    sudo nano /etc/apt/sources.list
    
  2. Replace the line containing the address http://ftp.us.debian.org/debian/ with the new address location:

    http://mirrors.linode.com/debian/

  3. Edit all lines containing the address http://security.debian.org/ to reflect the new address location:

    http://mirrors.linode.com/debian-security/

  4. Save and exit the sources.list file.

CentOS System Settings

For a CentOS system follow the instructions below:

  1. Edit the fastestmirror.conf file with the following command:

    sudo nano /etc/yum/pluginconf.d/fastestmirror.conf
    
  2. Change the enabled= variable to 0:

    File excerpt:/etc/yum/pluginconf.d/fastestmirror.conf

    enabled=0
    
  3. Save and exit the fastestmirror.conf file.

  4. Edit the CentOS-Base.repo file with the following command:

    sudo nano /etc/yum.repos.d/CentOS-Base.repo
    
  5. Comment each mirrorlist line by adding the # sign before each line.

  6. Uncomment each baseurl line by removing the # sign before each line.

  7. Edit all baseurl lines containing the address http://mirror.centos.org/centos/$releasever/os/$basearch/ to reflect the new address location:

    http://mirrors.linode.com/centos/$releasever/os/$basearch/

  8. Save and exit the CentOS-Base.repo file.

Creative Commons License

This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.

Last edited by Alex Fornuto on Monday, April 21st, 2014 (r4460).