Friday, August 31, 2012

How to create and add a Local YUM Repository for RHEL6 64Bit OS

Follow these simple steps to create Local yum repository for RHEL 6.0 64Bit OS;

  1. Copy your whole RHEL 6.0 DVD to a local folder, in my case i created "/rhel6_64repo/" folder to copy all these packages.
  2. Install "createrepo-<version>.rpm". It will ask for some of the dependency packages for installation, resolve it manually.
  3. Change working folder to "/rhel6_64repo/Packages/", where all the rpm packages are copied. #cd /rhel6_64repo/Packages .
  4. Run "#createrepo -v /rhel6_64repo/Packages/" command as root. It will take several minutes to build the repomd.xml file and you will find folder name “repodata” in "/rhel6_64repo/Packages/" folder.
  5. Now it's time to create repository file to "/etc/yum.repos.d/" folder. Make a file "# vi /etc/yum.repos.d/rhel6_64_local.repo" and add below content in it,
name=RHEL 6 64 Bit Local Repository

Run " #yum list " and now repo setup is ready to install/uninstall any rpm package without any dependency problem which is available in you RHEL DVD.

No comments:

Post a Comment