...
Создание локального зеркала с обновлениями.- установка скриптовых файлов для создание локального зеркала.
#
apt-get install sisyphus-mirrorКонфиг sisyphus-mirror:
/etc/sisyphus-mirror/sisyphus-mirror.conf Месторасположение зеркала:
/mnt/diskdata/ftp/ALTLinux Настроенный конфиг выглядит так:
#
cat /etc/sisyphus-mirror/sisyphus-mirror.conf# source mirror
SRCROOT=rsync://rsync.altlinux.org/ALTLinux#SRCROOT=rsync://mirror.yandex.ru/altlinux
#SRCROOT=rsync://ibiblio.org/Linux/distributions/altlinux
#SRCROOT=rsync://ftp.linux.kiev.ua/ALTLinux
# distination directory
DESTROOT=/mnt/diskdata/ftp/ALTLinux# example: we can use sisyphus-mirror for synchronize repos to removable media
#DESTROOT=/media/disk/ALTLinux
# repos for sync
LIST="p8/branch"#LIST="Sisyphus 4.0/branch updates backports people/shrek"
# architectures for sync
ARCH="noarch i586 x86_64 x86_64-i586 x86_32"# repos for search hardlinks
#LINK_LIST="Sisyphus p7/branch t7/branch"
LINK_LIST="p8/branch"# speed limit in Kb/s (--bwlimit=)
#SPEED=512
#SPEED=
# other argumets for rsync
# recommended for non-interactive mode:
ARGS="-rltmvH --delete-delay --delete-excluded --stats"# recommended for interactive mode:
#ARGS="-rltvhmH --progress --delete-delay --delete-excluded --stats"
#ARGS="-avz -x --stats --delete-after --progress"
# if 1, print output to stdout
INTERACTIVE=0# temp directory for synchronization
TMPDEST=.new# backup type - READ README.UTF8
#BACKUP_TYPE=one
#BACKUP_TYPE=snapshots
# directory for backups
#BACKUP_DIR=/var/ftp/ALTLinux/previous-state
#BACKUP_DIR=/var/ftp/ALTLinux/archive
# if you do not want to download some packages, use this file
EXCLUDE_FILE=/etc/sisyphus-mirror/exclude# this file needed when ARCH variable is used
INCLUDE_FILE=/etc/sisyphus-mirror/include# directory for custom configs and logs
RSHOME="$HOME/.sisyphus-mirror"# number of tries
#MAXATTEMPTS=10
# rsync protocol timeout (--timeout)
#TMOUT1=500
# pause between attempts
#TMOUT2=15
# http proxy server with HTTP CONNECT (host:port)
#RSYNC_PROXY=localhost:3128
- создать каталог хранения пакетов обновлений и каталог для лог-файла#
mkdir -p /mnt/diskdata/ftp/ALTLinux#
mkdir -p /var/log/mirror - возможно данный каталог создается программой
- создать каталог для скиптов запуска зеркалирования пакетов по расписанию#
mkdir -p /var/adm/crons- создать исполняемый файл скрипт#
touch /var/adm/crons/mirror_p8 && chmod +x /var/adm/crons/mirror_p8- добавить в файл следующие строчки (nano /var/adm/crons/mirror_p8)#
cat /var/adm/crons/mirror_p8#!/bin/bash
sisyphus-mirror -c /etc/sisyphus-mirror/sisyphus-mirror.conf -L /var/log/mirror- добавить запуск скрипта в планировщик (crontab -e) (выход из vim ':q', другой редактор планировщика-задать в консоли (export EDITOR=nano)echo -e "\nEDITOR=\"nano\"\nexport EDITOR" >> /root/.bashrc && export EDITOR="nano"#
crontab -l#| hour (0-23),
#| | day of the month (1-31),
#| | | month of the year (1-12),
#| | | | day of the week (0-6 with 0=Sunday).
#| | | | | commands
5 3 * * * /bin/bash /var/adm/crons/mirror_p8
(незабываем про перевод строки в конце задания в конф-файле планировщика)Подключить локальный репозиторий,
… доп. информация /etc/apt/sources.list.d/alt.list
- настройка на удаленное зеркало в локальной сети (x64)rpm [p8]
ftp://192.168.1.1/ALTLinux p8/branch/x86_64 classic
rpm [p8]
ftp://192.168.1.1/ALTLinux p8/branch/x86_64-i586 classic
rpm [p8]
ftp://192.168.1.1/ALTLinux p8/branch/noarch classic
- настройка на зеркало в каталоге на диске (x32)rpm [p8] file:///mnt/diskdata/ftp/ALTLinux p8/branch/i586 classic
rpm [p8] file:///mnt/diskdata/ftp/ALTLinux p8/branch/noarch classic
Размер каталога с обновлениями p8 32 и 64 - 120ГБ