Monday, March 6, 2017

How to configure YUM Server in Red hat linux 6

In this post, We will get know how to install or configure the Yum server on Red Hat Linux 6 operating system.

As you know their are several ways using which we can install the packages or rpm on the server. Please find the below step by step method to install the packages using YUM.

1. In the initial step please install the cd in cdrom and open a terminal for mount the cd in /mnt directory.

#mount –o loop /dev/cdrom /mnt

Here, we mount the CD of ISO in /mnt direcoty. You must enough space on /mnt folder before mounting this ISO.

2. Now in second step we will create a directory where we make a YUM repository.

#mkdir /rhel6

In this directory we will install all the YUM configuration files.

3. Now we will copy all the files from mount folder to newly created folder.

#cp –rvf /mn/* /rhel6

4. In this step, we will install the required packages which is required for create a repo on the server.

#cd /rhel6/Packages 
#rpm –ivh python*
#rpm –ivh createrepo*

These above packages is required for repostiory creation in YUM server.

5. Now move back again repodata directory and create a new repo for repository installation.

#createrepo  –v /rhel6/Packages

This is install all the packages on /rhel6 directory which is used for YUM configuration.

6. In this step we will create a new repo files in this directory.

#cd /etc/yum.repos.d/
#rm –rf *
#vi ss.repo

[Packages]
baseurl=file:///rhel6/Packages 
gpgcheck=0
enable=1

In this step if any exsiting repo if you found please remove it and create a new repo.

7. In the final step we will clean the repo and check the list of all rpm's using below commands.

#yum clean all
#yum list

Hope, using this post, you can easily install and configured the packages on the Red Hat Operating system. Please comment on the post if you encouter any issue.

No comments:

Post a Comment