software:linux_server:local_or_private_ubuntu_mirror
Различия
Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
| software:linux_server:local_or_private_ubuntu_mirror [2024/06/01 22:41] – [Создание дерева папок] vladpolskiy | software:linux_server:local_or_private_ubuntu_mirror [2025/02/01 09:45] (текущий) – внешнее изменение 127.0.0.1 | ||
|---|---|---|---|
| Строка 1: | Строка 1: | ||
| ======Создание локального зеркала Ubuntu====== | ======Создание локального зеркала Ubuntu====== | ||
| + | =====Введение===== | ||
| + | Локальные копии репозиториев нужны для установки программ на машины с Ubuntu, не подключённые к интернету. В этом случае можно создать копию нужных репозиториев на внешнем диске или на компьютере, | ||
| + | |||
| + | Локальная копия официального репозитория Ubuntu deb http:// | ||
| + | |||
| + | {{: | ||
| =====Создание дерева папок===== | =====Создание дерева папок===== | ||
| Создаём несколько папок в домашней дирректории, | Создаём несколько папок в домашней дирректории, | ||
| Строка 30: | Строка 36: | ||
| =====Установка зависимостей===== | =====Установка зависимостей===== | ||
| + | Установим web server Apache2 и настроим брандмауэр по аналогии в [[software: | ||
| + | \\ | ||
| Обновим список пакетов | Обновим список пакетов | ||
| \\ | \\ | ||
| Строка 39: | Строка 47: | ||
| \\ | \\ | ||
| и установим небходимое ПО | и установим небходимое ПО | ||
| + | \\ | ||
| + | Если web server Apache2 уже установлен, | ||
| + | < | ||
| + | sudo apt install debmirror gnupg xz-utils | ||
| + | </ | ||
| + | \\ | ||
| + | Иначе | ||
| \\ | \\ | ||
| < | < | ||
| Строка 94: | Строка 109: | ||
| {{: | {{: | ||
| \\ | \\ | ||
| - | c=====Скрипт mirrorkernel.sh====== | + | c |
| + | =====Скрипт mirrorkernel.sh====== | ||
| Теперь создадим mirrorkernel.sh, | Теперь создадим mirrorkernel.sh, | ||
| < | < | ||
| Строка 111: | Строка 127: | ||
| --arch=amd64 / | --arch=amd64 / | ||
| </ | </ | ||
| + | \\ | ||
| + | * --host=archive.ubuntulinux.org - это адрес репозитория (без слеша на конце, | ||
| + | * --root=ubuntu - это тот каталог, | ||
| + | * --method=ftp - ftp или http | ||
| + | * --dist=hardy, | ||
| + | * --section=main, | ||
| + | * --arch=i386 - архитектура. Значение i386 говорит о том, что будут скачаны пакеты для компьютера с архитектурой x86. Этот параметр также может принимать значение amd64 для 64-битных AMD или Intel компьютеров. | ||
| \\ | \\ | ||
| {{: | {{: | ||
| Строка 122: | Строка 145: | ||
| sudo chmod +x mirrorkernel.sh | sudo chmod +x mirrorkernel.sh | ||
| </ | </ | ||
| + | chmod (от англ. change mode) — команда для изменения прав доступа к файлам и каталогам, | ||
| + | |||
| \\ | \\ | ||
| {{: | {{: | ||
| Строка 129: | Строка 154: | ||
| < | < | ||
| sudo apt install screen | sudo apt install screen | ||
| - | sudo screen / | + | sudo screen / |
| </ | </ | ||
| + | \\ | ||
| + | screen это терминальный мультиплексор. Процесс, | ||
| + | [[https:// | ||
| + | \\ | ||
| + | После выполнения команды пойдет загрузка файлов в наше локальное зеркало: | ||
| + | \\ | ||
| + | {{: | ||
| + | \\ | ||
| + | Cron – планировщик задач. Если подробнее, | ||
| + | \\ | ||
| + | < | ||
| + | sudo crontab -e | ||
| + | </ | ||
| + | \\ | ||
| + | Select an editor. | ||
| + | 1. / | ||
| + | 2. / | ||
| + | 3. / | ||
| + | 4. /bin/ed | ||
| + | |||
| + | Choose 1-4 [1]: 1 | ||
| + | ------------------------ | ||
| + | Для nano выберем 1 | ||
| + | \\ | ||
| + | < | ||
| + | 0 0 1 * * / | ||
| + | </ | ||
| + | \\ | ||
| + | запускать скрипт 1 числа каждого месяца | ||
| + | \\ | ||
| + | * См. подробнее о [[https:// | ||
| + | * [[https:// | ||
| + | \\ | ||
| + | {{: | ||
| + | \\ | ||
| =====Настройка доступа к зеркалу===== | =====Настройка доступа к зеркалу===== | ||
| Создадим символическую ссылку из / | Создадим символическую ссылку из / | ||
| Строка 156: | Строка 216: | ||
| {{: | {{: | ||
| \\ | \\ | ||
| - | перейдем на главную страницу в браузере нашего сервера (в примере http:// | + | перейдем на главную страницу в браузере нашего сервера (в примере http:// |
| \\ | \\ | ||
| {{: | {{: | ||
| \\ | \\ | ||
| - | И наконец перейдем в папку для которой мы ранее указали символическую ссылку (в примере http:// | + | И наконец перейдем в папку для которой мы ранее указали символическую ссылку (в примере http:// |
| \\ | \\ | ||
| + | {{: | ||
| \\ | \\ | ||
| =====Файлы и Дополнения===== | =====Файлы и Дополнения===== | ||
| - | {{ : | + | Официальные репозитарии Ubuntu |
| + | < | ||
| + | deb http:// | ||
| + | deb-src http:// | ||
| + | |||
| + | deb http:// | ||
| + | deb-src http:// | ||
| + | |||
| + | deb http:// | ||
| + | deb-src http:// | ||
| + | |||
| + | deb http:// | ||
| + | deb-src http:// | ||
| + | |||
| + | deb http:// | ||
| + | deb-src http:// | ||
| + | </ | ||
| + | |||
| + | =====Настройка клиенских системы===== | ||
| + | <fc #22b14c> Просмотреть все репозитории:</ | ||
| + | < | ||
| + | sudo nano / | ||
| + | </ | ||
| + | <fc # | ||
| + | {{: | ||
| + | <fc # | ||
| + | < | ||
| + | sudo cp / | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | #deb cdrom: | ||
| + | |||
| + | # See http:// | ||
| + | # newer versions of the distribution. | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## Major bug fix updates produced after the final release of the | ||
| + | ## distribution. | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## 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:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## 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:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## 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:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | # This system was installed using small removable media | ||
| + | # (e.g. netinst, live or single CD). The matching "deb cdrom" | ||
| + | # entries were disabled at the end of the installation process. | ||
| + | # For information about how to configure apt package sources, | ||
| + | # see the sources.list(5) manual. | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <fc # | ||
| + | < | ||
| + | deb http:// | ||
| + | deb http:// | ||
| + | deb http:// | ||
| + | deb http:// | ||
| + | </ | ||
| + | {{: | ||
| + | <fc # | ||
| + | < | ||
| + | sudo apt-get update | ||
| + | </ | ||
| + | <fc # | ||
| + | sudo apt update | ||
| + | {{: | ||
| + | <fc # | ||
| + | < | ||
| + | sudo apt-get dist-upgrade | ||
| + | </ | ||
| + | {{: | ||
| + | |||
| + | <fc # | ||
| + | < | ||
| + | deb http:// | ||
| + | deb http:// | ||
| + | deb http:// | ||
| + | deb http:// | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | #deb cdrom: | ||
| + | |||
| + | # See http:// | ||
| + | # newer versions of the distribution. | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## Major bug fix updates produced after the final release of the | ||
| + | ## distribution. | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## 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:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## 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:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | ## 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:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | deb http:// | ||
| + | # deb-src http:// | ||
| + | |||
| + | # This system was installed using small removable media | ||
| + | # (e.g. netinst, live or single CD). The matching "deb cdrom" | ||
| + | # entries were disabled at the end of the installation process. | ||
| + | # For information about how to configure apt package sources, | ||
| + | # see the sources.list(5) manual. | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | {{: | ||
| + | <fc # | ||
| + | < | ||
| + | sudo apt-get update | ||
| + | </ | ||
| + | <fc # | ||
| + | sudo apt update | ||
| + | {{: | ||
| + | <fc # | ||
| + | < | ||
| + | sudo apt-get dist-upgrade | ||
| + | </ | ||
| + | |||
| + | {{: | ||
| + | =====Дополнения и Файлы===== | ||
| + | |||
| + | * {{ : | ||
software/linux_server/local_or_private_ubuntu_mirror.1717270884.txt.gz · Последнее изменение: — vladpolskiy
