Sunday, 23 November 2014

If you are having RHEL installed on your server and you wish to install new packages or update existing ones, creating local repository will be a good option. Setting up local YUM repositories will fetch the packages/updates from the local server, not only saving the bandwidth and hence the cost, but also the installation process will fasten up.

This tutorial will guide you to set up a local YUM repository on your RHEL/CentOS systems.

Step 1: Mount the DVD or ISO.

For DVD, you can run

$ mount /dev/cdrom /mnt

For ISO, you can run

$ mount -t iso9660 -o loop /path/to/iso/image /mnt

Step 2: Install the 'createrepo' package.

In order to install 'createrepo' package along with its dependencies, execute the following command: