Wednesday, May 12, 2010

Installing yum and creating repository

Yum can be installed for easy installation of rpm and to overcome various dependencies of rpm.
Various steps are:
1) Mount cd on any directory and then copy the rpm into the directory /var/ftp/pub/Server(create the directory ftp,pub,Server).
2) Goto the server directory and install the package using command
# rpm -ihv createrepo*
(createrepo is the name of the package and * is a wild card with any number of characters after the keyword)
3) Migrate to directory location /etc/yum.repose.d using command
# cd /etc.yum.repose.d
4) Open the file rhel-debuginfo.repo using the command
# vi rhel-debuginfo.repo
Make the necessary changes and the file should contain only this information.
Delete all other information

[Rhel]
baseurl:file///var/ftp/pub/Server
enabled=1
gpgcheck=1

5) #rm -fr .olddata/
It will give you instruction that old data need to be deleted manually.

You are done!!! wow:)
Now install any rpm package using #yum install
CAUTION: It is advisable to copy the file rhel-debuginfo.repo to any other location as a backup copy.

0 comments:

Post a Comment