Thursday, September 13, 2012

Yum Repository on RHEL

Hi All,

Simple steps to create Yum.repo file for installation of RPM/packages with Binaries or dependant files on Lnux.

login to the server with root privilege.

mount /dev/dvd /mnt
mounting will be in read only mode.
cd /mnt
list of content will be there. now just follow below steps to create a repo.
 cd /etc/yum.repos.d/
 remove or rename any already existing repo file.
 create a new file using vi editor.
like vi yum.repo :- write into the file
[Server] :---/Package/Installater/any name u want to keep
name=Server
baseurl=file:///mnt/Packages/
gpgcheck=0
enabled=1
:wq! :- to save and exit from VI
5. yum clean all
6. yum update all.

now u should see some updates happeing on the server and after that u can use below command to install any package existing on DVD/cd of RHEL 5,5.4, 6.0 or 6.2. which is as per your DVD and as per your need.

7. yum install samba* or telnet-* or any package according to requirement.

troubleshooting:-

If yum update all shows mirror error, then try changing baseurl path as /mnt only. and run
yum clean all
again and then run
yum update all
it should not show any further errors.

=================================================================
there is another way to install local rpm packages which are just installed from internet and need dependant files.

just copy package using winscp or any tool on ur linux machine's /tmp.

yum localinstall --nogpgcheck /tmp/

==================================================================

Amit Chopra

No comments: