SETTING UP LINUX YUM REPOSITORY IN REDHAT/CENTOS
when we implement the REDHAT based servers, when we dont have the proper license we will be facing a lot of issues for installing the softwares. So to overcome the issue we need to setup the LOCAL REPOSITORY server. this will eliminate the installation issues.Below i have explained how to setup the repo server step-by-step.
SETTING UP LOCAL REPOSITORY SERVER IN YOUR REDHAT/CENTOS:
PREREQUISITES:
1.HTTPD SERVER
2.CREATEREPO RPM
1. Create a new file under /var/www/html
CMD: mkdir -p /var/www/html/REPO/RH5
2.Copy all the contents from the DVD to RH5 folder ,which we created.
CMD: cp -v /media/RHEL5/Server/*.rpm /var/www/html/REPO/RH5
3.after completing the copy operation install the createrepo rpm.
CMD: rpm -ivh createrepo.<version>
4.then execute the following command
CMD: createrepo -v /var/www/html/REPO/RH5
5.When createrepo operation finished go to /etc folder
CMD: cd /etc
6.then edit the yum.conf file through vi/vim editor
CMD: vi yum.conf
7.place the following lines into your client machine yum.conf file.
[my_localrepo]
baseurl=http://<ip address>/REPO/RH5
8.Check whether HTTPD daemon running by issuing the following command
CMD: service httpd status ( if not running)
CMD: service httpd start
9.To permanently make effect run the following command
CMD: chkconfig –level 35 httpd on
10.to check the repository issue the following command
CMD: yum install <your package name>
if not happening clean all the yum repository cache
CMD: yum clean all
and also don’t forget to import the GPG keys
CMD: rpm –import <GPG-KEYS-LOCATION>