Search This Blog

Friday, November 2, 2012

Create Repository


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.

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:///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

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  

No comments:

Post a Comment