Yum Configuration


First of all while installing redhat 5 please make sure you install createrepo package ( very very important)

Let create a local yum repository with ftp service.

1:First create a folder name Server in /var/ftp/pub/
          #mkdir -p /var/ftp/pub/Server

2: copy all the packages from the cd or dvd to /var/ftp/pub/Server
          # cd /media/

          # cd Packages

          # cp -rf * /var/ftp/pub/Server

3: Once all the packages are copied in /var/ftp/pub/Server . We need to run this command

          #cd /var/ftp/pub

          #createrepo -v Server/

4: After running the command go into the folder Server/ .You will be able to see repodata folder

5: Go into to the folder and check whether four .xml files are created.

6: Great that is it your yum repository is ready .

7: Now just start the ftp service

          # service vsftpd restart

8:Now we need to edit the Yum configuration file

          #cd /etc/yum.repos.d

9:Now we will edit the file

          # vi rheldebug.info

10: Please edit remove all the lines and make this entry

[rhel-server]
name=
baseurl=ftp://< youripaddress >/pub/Server
enable = 1
gpgcheck = 0

save this file

Now run this command

#yum clean all

Thats it now the yum server is ready for http service just add the packages in /var/www/html/Server
follow step 3

restart the httpd service

make an entry in vi /etc/yum.repos.d/rheldebug.info
here in baseurl://http:///html/Server
and for ordinary yum
make this entry in vi /etc/yum.repos.d/rheldebug.info
baseurl://file:///
eg baseurl://file:///var/ftp/pub/Server


1 comment:

  1. Nice and good article.It will helpful for interview perspective.I have suggested to my friends to go through this blog. Thanks for sharing this useful information. If you want to learn Linux course in online, please visit below site.
    Linux Online Training
    linux online course
    Linux Online Training in Hyderabad
    Linux Online Training in Bangalore
    Linux Online Training in Chennai

    ReplyDelete