Настройка локальных репозиториев

В этой заметке хочу пару слов сказать о настройке локальных репозиториев. По умолчанию, в Ubuntu прописаны официальные сервера обновлений. И скорость скачивания с них напрямую зависит от вашего внешнего интернет-соединения. В крупных городах пользователи имеют высокоскоростной и безлимитный интернет, но в регионах с интернетом дела обстоят хуже. Маленькая скорость, дорогие тарифы… Хорошим решением будет настройка локальных репозиториев. Конечно, при условии, что они есть в вашей сети.

Например, одним из крупных и локальных для многих пользователей является сервер Яндекса. ( mirror.yandex.ru ) Стоит отметить, что сервер Яндекса имеет статус официального для Ubuntu. Рассмотрим настройку локальных репозиториев на примере Яндексовсого сервера Открываем файл /etc/apt/sources.list командой

sudo gedit /etc/apt/sources.list

Изначально, содержимое файла в Ubuntu 8.10 имеет такой вид:

# deb cdrom:[Ubuntu 8.10 _Intrepid Ibex_ — Release i386 (20081029.5)]/ intrepid main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution.deb http://ru.archive.ubuntu.com/ubuntu/ intrepid main restricted deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid main restricted

## Major bug fix updates produced after the final release of the ## distribution. deb http://ru.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://ru.archive.ubuntu.com/ubuntu/ intrepid universe deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid universe deb http://ru.archive.ubuntu.com/ubuntu/ intrepid-updates universe deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://ru.archive.ubuntu.com/ubuntu/ intrepid multiverse deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid multiverse deb http://ru.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse

## Uncomment the following two lines to add software from the ‘backports’ ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://ru.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse # deb-src http://ru.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical’s ## ‘partner’ repository. This software is not part of Ubuntu, but is ## offered by Canonical and the respective vendors as a service to Ubuntu ## users. deb http://archive.canonical.com/ubuntu intrepid partner # deb-src http://archive.canonical.com/ubuntu intrepid partner

deb http://security.ubuntu.com/ubuntu intrepid-security main restricted deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted deb http://security.ubuntu.com/ubuntu intrepid-security universe deb-src http://security.ubuntu.com/ubuntu intrepid-security universe deb http://security.ubuntu.com/ubuntu intrepid-security multiverse deb http://ru.archive.ubuntu.com/ubuntu/ intrepid-proposed restricted main multiverse universe deb-src http://security.ubuntu.com/ubuntu intrepid-security multiverse Чтобы настроить обновления только с Яндексовских серверов удалите все строки, и добавьте:

deb http://mirror.yandex.ru/ubuntu/ intrepid main restricted universe multiverse deb http://mirror.yandex.ru/ubuntu/ intrepid-updates main restricted universe multiverse deb http://mirror.yandex.ru/ubuntu/ intrepid-backports main restricted universe multiverse deb http://mirror.yandex.ru/ubuntu/ intrepid-security main restricted universe multiverse deb http://mirror.yandex.ru/ubuntu/ intrepid-proposed main restricted universe multiverse Теперь обновим информацию командой

sudo apt-get update

Настройка закончена.