How to configure yum repo in Redhat 6.5



YUM- yum is a primary tool for installing,deleting,querying and managing RPM's.This is most important if we are going to use Redhat Server.

                                           Here I am going to describe about it.
First of all we should have root privileges for doing this task.
Step1- Mount RHEL DVD in /mnt

# mount /dev/cdrom /mnt
#cd /mnt
# cd /Packages
# rpm -ivh vsftpd (Press Tab it will take required rpm)

Step2- Make a directory in /var/ftp/pub/rhel6
# mkdir /var/ftp/pub/rhel6
Now copy all the data from DVD to this directory.

# cd /mnt
#mnt- cp -arv * /var/ftp/pub/rhel6
It will take few minutes for completing this process.

Step3- Now install below 3 rpms
# cd /var/ftp/pub/rhel6
# cd Packages
#  rpm -ivh delta (Press Tab it will take required rpm)
#  rpm -ivh python (Press Tab it will take required rpm)
#  rpm -ivh create repo (Press Tab it will take required rpm)

Step4- Now create a file as below.
# vi /etc/yum.repos.d/rhel6.repo
# [Server]
name= "Redhat Enterprise Linux"
baseurl= file:///var/ftp/pub/rhel6
gpgcheck=0
enabled=1
# Make this entry and save it.

Step5- run below command after making file.
# createrepo -v /var/ftp/pub/rhel6/
Here it will take some time for creating repo.
# yum update

Now YUM server is ready :)

Comments

Popular posts from this blog

Core 5 Security Epics in AWS Cloud

Why do you need to monitor your network?

How to change Domain account logging password