Tuesday 11 June 2013

Software Channel Management


Adding Software Channel

CentOS 6 Base for i386

Name
CentOS 6 base i386
Label
centos6-base-i386
Parent Channel
None
Parent Channel Architecture
IA-32
Channel Summary
CentOS 6 Base for i386 architecture
Repository
centos6-base-i386
GPG Key URL
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
GPG Key ID
C105B9DE
GPG Key Fingerprint
C1DA C52D 1664 E8A4 386D BA43 0946 FCA2 C105 B9DE

CentOS 6 Updates for i386

Name
CentOS 6 updates i386
Label
centos6-updates-i386
Parent Channel
centos6-base-i386
Parent Channel Architecture
IA-32
Channel Summary
CentOS 6 updates for i386 architecture
Repository
centos6-updates-i386
GPG Key URL
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
GPG Key ID
C105B9DE
GPG Key Fingerprint
C1DA C52D 1664 E8A4 386D BA43 0946 FCA2 C105 B9DE

Extra Packages Enterprise Linux(EPEL) 6 for i386

Name
EPEL 6 i386
Label
epel6-i386
Parent Channel
centos6-base-i386
Parent Channel Architecture
IA-32
Channel Summary
Extra Packages Enterprise Linux(EPEL) 6 for i386 architecture
Repository
epel6-i386
GPG Key URL
https://fedoraproject.org/static/0608B895.txt
GPG Key ID
0608B895
GPG Key Fingerprint
8C3B E96A F230 9184 DA5C 0DAE 3B49 DF2A 0608 B895

PostgreSQL 9.1 for i386

Name
PostgreSQL 9.1 i386
Label
postgresql91-i386
Parent Channel
centos6-base-i386
Parent Channel Architecture
IA-32
Channel Summary
PostgreSQL 9.1 i386 Yum Repository
Repository
pgdg91-i386
GPG Key URL
GPG Key ID
442DF0F8
GPG Key Fingerprint
68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8

PostgreSQL 9.2 for i386

Name
PostgreSQL 9.2 i386
Label
postgresql92-i386
Parent Channel
centos6-base-i386
Parent Channel Architecture
IA-32
Channel Summary
PostgreSQL 9.2 i386 Yum Repository
Repository
pgdg92-i386
GPG Key URL
GPG Key ID
442DF0F8
GPG Key Fingerprint
68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8

Spacewalk 1.9 i386

Name
Spacewalk 1.9 i386
Label
spacewalk19-i386
Parent Channel
centos6-base-i386
Parent Channel Architecture
IA-32
Channel Summary
Spacewalk 1.9 i386
Repository
spacewalk19-el6-i386
GPG Key URL
http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
GPG Key ID
863A853D
GPG Key Fingerprint
8F85 8A91 03E3 3965 6BE9 64D0 0E64 6F68 863A 853D

CentOS 6 Base for x86_64

Name
CentOS 6 base x86_64
Label
centos6-base-x86_64
Parent Channel
None
Parent Channel Architecture
x86_64
Channel Summary
CentOS 6 Base for x86_64 architecture
Repository
centos6-base-x86_64
GPG Key URL
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
GPG Key ID
C105B9DE
GPG Key Fingerprint
C1DA C52D 1664 E8A4 386D BA43 0946 FCA2 C105 B9DE

CentOS 6 Updates for x86_64

Name
CentOS 6 updates x86_64
Label
centos6-updates-x86_64
Parent Channel
centos6-base-x86_64
Parent Channel Architecture
x86_64
Channel Summary
CentOS 6 updates for x86_64 architecture
Repository
centos6-updates-x86_64
GPG Key URL
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
GPG Key ID
C105B9DE
GPG Key Fingerprint
C1DA C52D 1664 E8A4 386D BA43 0946 FCA2 C105 B9DE

Extra Packages Enterprise Linux(EPEL) 6 for x86_64

Name
EPEL 6 x86_64
Label
epel6-x86_64
Parent Channel
centos6-base-x86_64
Parent Channel Architecture
x86_64
Channel Summary
Extra Packages Enterprise Linux(EPEL) 6 for x86_64 architecture
Repository
epel6-x86_64
GPG Key URL
https://fedoraproject.org/static/0608B895.txt
GPG Key ID
0608B895
GPG Key Fingerprint
8C3B E96A F230 9184 DA5C 0DAE 3B49 DF2A 0608 B895

PostgreSQL 9.1 for x86_64

Name
PostgreSQL 9.1 x86_64
Label
postgresql91-x86_64
Parent Channel
centos6-base-x86_64
Parent Channel Architecture
x86_64
Channel Summary
PostgreSQL 9.1 x86_64 Yum Repository
Repository
pgdg91-x86_64
GPG Key URL
GPG Key ID
442DF0F8
GPG Key Fingerprint
68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8

PostgreSQL 9.2 for x86_64

Name
PostgreSQL 9.2 x86_64
Label
postgresql92-x86_64
Parent Channel
centos6-base-x86_64
Parent Channel Architecture
x86_64
Channel Summary
PostgreSQL 9.2 x86_64 Yum Repository
Repository
pgdg92-x86_64
GPG Key URL
GPG Key ID
442DF0F8
GPG Key Fingerprint
68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8

Spacewalk 1.9 x86_64

Name
Spacewalk 1.9 x86_64
Label
spacewalk19-x86_64
Parent Channel
centos6-base-x86_64
Parent Channel Architecture
x86_64
Channel Summary
Spacewalk 1.9 x86_64
Repository
spacewalk19-el6-x86_64
GPG Key URL
http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
GPG Key ID
863A853D
GPG Key Fingerprint
8F85 8A91 03E3 3965 6BE9 64D0 0E64 6F68 863A 853D

Sync scheduling

GUI


  • GUI는 동기화 진행사항을 확인 할 수 없음 단, /var/log/rhn/reposync/<Channel Label>-<시간>.log 로그 파일로 확인 가능함
  • RPM 저장소 위치는 다음 위치에서 설정가능

  • 특정 채널의 특정 패키지만을 동기화 할 수 없으므로 전체 동기화에 따른 디스크 용량을 반드시 고려해야함

Command

    1. Installing YUM utilities
      yum install yum-utils createrepo -y
    2. Create Local Repositories
      mkdir -p /var/www/html/pub/CentOS6/{i386,x86_64}
    3. Creating cron task
      /etc/cron.daily/spacewalk-repo-sync
      #!/bin/sh
      # try to create the lock and check the outcome
      LOCKFILE=/var/run/spacewalk_sync.lock
      lockfile -r 0 ${LOCKFILE} 1>/dev/null 2>&1
      status=$?
      if [ ${status} -ne 0 ] ;then
              echo "Another instance already running. Aborting."
              exit 1
      fi
      trap "rm ${LOCKFILE}" EXIT
      /usr/bin/spacewalk-repo-sync --channel centos6-base-i386 \
                                   --url http://centos.mirror.cdnetworks.com/6/os/i386/ \
                                   --type yum > /dev/null
      
      /usr/bin/spacewalk-repo-sync --channel centos6-updates-i386 \
                                   --url http://centos.mirror.cdnetworks.com/6/updates/i386/ \
                                   --type yum > /dev/null
      
      /usr/bin/spacewalk-repo-sync --channel centos6-base-x86_64 \
                                   --url http://centos.mirror.cdnetworks.com/6/os/x86_64/ \
                                   --type yum > /dev/null
      
      /usr/bin/spacewalk-repo-sync --channel centos6-updates-x86_64 \
                                   --url http://centos.mirror.cdnetworks.com/6/updates/x86_64/ \
                                   --type yum > /dev/null
      
      reposync --repoid=epel6-i386 -c /etc/reposync.conf -p /var/www/html/pub/CentOS6/i386 -d -l -g -n -q > /dev/null
      cd /var/www/html/pub/CentOS6/i386/epel6-i386
      createrepo /var/www/html/pub/CentOS6/i386/epel6-i386 > /dev/null
      /usr/bin/spacewalk-repo-sync --channel epel6-i386 \
                                   --url file:///var/www/html/pub/CentOS6/i386/epel6-i386/ \
                                   --type yum > /dev/null
      
      reposync --repoid=epel6-x86_64 -c /etc/reposync.conf -p /var/www/html/pub/CentOS6/x86_64 -d -l -g -n -q > /dev/null
      cd /var/www/html/pub/CentOS6/x86_64/epel6-x86_64
      createrepo /var/www/html/pub/CentOS6/x86_64/epel6-x86_64 > /dev/null
      /usr/bin/spacewalk-repo-sync --channel epel6-i386 \
                                   --url file:///var/www/html/pub/CentOS6/x86_64/epel6-x86_64/ \
                                   --type yum > /dev/null
      # chmod 700 /etc/cron.daily/spacewalk_sync.cron
      # chown root:root /etc/cron.daily/spacewalk_sync.cron

No comments:

Post a Comment