顯示具有 yum 標籤的文章。 顯示所有文章
顯示具有 yum 標籤的文章。 顯示所有文章

2014年3月2日 星期日

Checksum type used in repomd.xml and for packages in the metadata between RHEL5 and RHEL6

  • If you need to create a YUM repository on RHEL6 and need to provide the YUM repository service to RHEL5 clients, you need to create the repository using checksum type of sha because the of the differences below and RHEL5 clients cannot recognize sha256 checksum.
    1. RHEL5 : The older default was "sha"
    2. RHEL6 : The default is now "sha256".
  •  Failure to do so will cause the error message below when you are accessing the YUM repository from a RHEL5 client with command like : "yum list"
    1. Error Message : primary.xml.gz: [Errno -3] Error performing checksum
  • Solution is as below:
    1. createrepo -s sha

2011年12月17日 星期六

Local Linux YUM repository for ISO image

The initiative of this setup is basically started when I find the PERL RPM package (needed by VMware Tools) is not installed on my Virtual Machine by default, which prevents me from continuing doing my VMware HA VM Monitoring Lab.

If you are sick of RPM installation inter-dependencies and are lazy (like me) to setup an apache instance for YUM, please continue to read. ;-)

  • Mount the RHEL 6 ISO image
    • # mkdir -p /mnt/iso/1
    • # mount -o loop /dev/sr0 /mnt/iso/1
    • # cd /mnt/iso/1/Packages
    • # yum install createrepo-0.9.8-4.el6.noarch.rpm python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm deltarpm-3.5-0.5.20090913git.el6.i686.rpm
  • Create the repository
    • # cd /mnt/iso; createrepo .
    • # ......
    • # ...... # Please take a cup of coffee
    • # ......
    • # yum clean all
  • Populate the repo file
    • # cd /etc/yum.repos.d
    • # echo -e "[iso]\nbaseurl=file:///mnt/iso\nenabled=1" > iso.repo
    • # yum install perl
  • Import the public key for RPM
    • Error shows when you run yum install perl
    • Public key for perl-Pod-Simple-3.13-119.el6.i686.rpm is not installed
    • Fix it as follows:
    • cd /mnt/iso/1
    • rpm --import RPM-GPG-KEY-redhat-release
    • yum install perl