wiki:centos:repo_sync

Dies ist eine alte Version des Dokuments!


Repositiory synchronisieren

Auf Server

  1. FTP einrichten
  2. Repo herunterladen
    reposync --gpgcheck -l --downloadcomps --repoid=base --norepopath --download_path=/var/ftp/centos/7/base/x86_64
  3. Inhaltsverzeichnis erstellen
    createrepo -v -g /var/ftp/centos/7/base/x86_64/comps.xml /var/ftp/centos/7/base/

Auf Client

  1. ensprechendes Repo deaktivieren yum-config-manager –disable <reponame> (Reponame über yum repolist)
  2. oder Repo-Datei löschen
  3. Repo einbinden yum-config-manager –add-repo=<Server>/<Reponame>
  4. yum repolist all
  5. in der entsprechendnen Repo-Datei (/etc/yum.repos.d/<name>.repo) den Reponamen ändern:
    Beispiel:
    [own_centos_7_base]
    name=Mirrored CentOS7 - base
    baseurl=ftp://192.168.0.55/centos/7/base
    enabled=1

Eine fertige .repo-Datei könnte wie folgt aussehen

my_local.repo
[own_centos_7_base]
name=Mirrored CentOS7 - base
baseurl=ftp://192.168.0.55/centos/7/base
enabled=1
 
[own_centos_7_updates]
name=Mirrored CentOS7 - Updates
baseurl=ftp://192.168.0.55/centos/7/updates
enabled=1
 
[own_centos_7_epel]
name=Mirrored CentOS7 - epel
baseurl=ftp://192.168.0.55/centos/7/epel
enabled=1
 
[own_centos_7_extras]
name=Mirrored CentOS7 - extras
baseurl=ftp://192.168.0.55/centos/7/extras
enabled=1
repo_sync.sh
#!/bin/bash
 
reposync --gpgcheck -l --downloadcomps --repoid=base --norepopath --download_path=/var/ftp/centos/7/base/x86_64 \
        && createrepo -g /var/ftp/centos/7/base/x86_64/comps.xml /var/ftp/centos/7/base/
 
reposync --gpgcheck -l --downloadcomps --repoid=extras --norepopath --download_path=/var/ftp/centos/7/extras/x86_64 \
        && createrepo /var/ftp/centos/7/extras/
 
reposync --gpgcheck -l --downloadcomps --repoid=updates --norepopath --download_path=/var/ftp/centos/7/updates/x86_64 \
        && createrepo /var/ftp/centos/7/updates/
 
reposync --gpgcheck -l --downloadcomps --repoid=epel --norepopath --download_path=/var/ftp/centos/7/epel/x86_64 \
        && createrepo -g /var/ftp/centos/7/epel/x86_64/comps.xml /var/ftp/centos/7/epel/

Quellen

Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   ____   _  __   ____   ___    ___ 
  / __/  | |/_/  / __/  / _ |  / _ |
 / _/   _>  <   _\ \   / __ | / __ |
/_/    /_/|_|  /___/  /_/ |_|/_/ |_|
 
  • wiki/centos/repo_sync.1432566491.txt.gz
  • Zuletzt geändert: 2015/05/25 17:08
  • von wikiadmin