How to configure YUM repository in Linux/Centos/Redhat | YUM in Linux/Centos/Redhat
In this we are going to configure yum repository for local installation of packages. Mainly YUM helps to install the RPM with its redundancy. It prevents to worry about redundancy and updating RPM
I. Make directory /dvd by using following command. This is the mount point for /dev/hdc (this my DVD rom connected at secondary master).
II.Mount using following command
III. Need to copy all rpm’s from CD or DVD to /var/ftp
IV. For creating repodata we need to download createrepo rpm. Following command to download from terminal.Or use browser to download click HERE. To get the latest release click Here.
V.Once installed use the following command to create the repodata files
VI.Once above done. Move *.repo files from the
Centos 5:The reason to move is if you don’t have Internet connection when you installing package with yum, which try to resolve the base centos repository file which is located in /etc/yum.repos.d/Centos-xxxx.repo. So it will not install rpm from local repository Above movement helped to install rpm from local repository.If you have Internet connection move it back to original and install rpm with yum.
VII.Edit the /etc/yum.conf file put the following lines at the end.
VIII.Clean up previous caching by following command. This is important when you are changing repo files or rpm on your repository.
IX.Install rpm with the following command.