How to configure yum in linux(Redhat)

Connect with

configure yum in linuxHow to configure yum in Linux. In any version 4 and above it will work. Login from root or superuser user in Linux.

Go to /etc/yum.repos.d directory where all repository files are available.

# cd  /etc/yum.repos.d

Create a new file having extension .repo

# vi /etc/yum.repo.d/my_linux_yum.repo
Inside vi or vim editor write :
[Server]   <------ This name of directory where you keep your packages.

name = my_linux_yum   <---- Any name as per your convenience.

baseurl=file:///home/user/Server    <----Complete path of the dir where package are placed.

gpgcheck = 0

[Esc]

:wq  <--- Save and quit

 

After that install package from your rpm directory having the name createrep<tab> by the below command.

#rpm -ivh createrepo<tab>

# createrepo -v /home/user/ServerNow your yum is configured successfully, you can install packages.

#yum install java -y
#yum install c++* -y
#yum install python* -y


Connect with

1 thought on “How to configure yum in linux(Redhat)”

  1. Pingback: rakhi

Leave a Comment

Your email address will not be published. Required fields are marked *