This
is my first post, hope you are like my blog content. I am trying to
provide you the simple and straight forward solution on this post.
In
this post, I will guide to you, how to configure YUM server in Red Hat
Linux 7 operating system. Yum tends for Yellowdog Updater Modified
utility which used for package management system on Linux environment.
In the below post, you can find the step by step method of configuration
and installation of YUM.
Step by Step Method of Installation & Configuration of YUM:
➤
If you have Red Hat Linux 7 operating system image or cd, then please
mount this iso or cd on cdrom device of operating system.
[root@localhost]# mount -o loop /dev/cdrom /mnt
In
above command syntax, you can able to see we have mount the our Red Hat
Linux 7 operating system image on /mnt file system. Normally /mnt file
system are used for mounting purpose only but its depends upon every
user understanding.
➤ Please create a directory where you want to copy the all packages files for configuration of YUM server.
[root@localhost]# mkdir /"Directory Name"
In
linux operating system mkdir command are used for creating a directory.
In my case I normally use "/yumserver" name for YUM configuration. When
you create a directory please change your directory name.
➤ Please copy the all files from "/mnt" directory to /"Directory Name".
[root@localhost]# cp -rvf /mnt/* /"Directory Name"
Using
this command all the packages files are copied on the other place, you
need to keep save this directory otherwise your YUM configuration is not
works.
➤
In this step, we will go the the packages directory and install the
required rpm packages which are required for installation of YUM server.
[root@localhost]# cd /yumserver/Packages
You
can use your directory name to reach the packages folder. Now once we
reached in this directory then we will install the required rpm packages
one by one in below sequence.
[root@localhost]# rpm -ivh deltarpm-3.6-3.el7.x86_64.rpm
[root@localhost]# rpm -ivh python-deltarpm-3.6-3.el7.x86_64.rpm
[root@localhost]# rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm
If
you are trying to install the above rpm packages and not follow the
above installation of rpm's in same sequence then you are definitely
getting an dependency error.
➤
For creating a repo packages, you need to createrepo of all the
packages, for this please run the below command on your terminal window.
[root@localhost]# createrepo –v /yumserve/Packages
Please
change the yum directory name which you used in above steps. Using this
command all the packages repo has been created on the yum directory.
➤ Create a repo file on the below directory location. Please used the valid name while creating a repo file.
[root@localhost]# cd /etc/yum.repos.d/
[root@localhost]# vi yumserver.repo
You can change the repo file name according to your feasibility. Now please write the below entry inside this file.
#########################
[Packages]
baseurl=file:///yumserver/Packages
gpgcheck=0
enable=1
########################
This
is the main file content, so please more careful while doing the entry
in this file. You can change the baseurl location as per your YUM
packages directory location. After saving the file go for final step.
➤
In final step, as you configured the YUM configuration file, now you
need to clean your yum repo and used it for installation the packages.
[root@localhost]# yum clean all
When
you run this command , some space from /var file system get free,
actually during packages installation /var file system get increase
sometimes.
[root@localhost]# yum list
above command show you all the yum repo which exist on this server. In our case you can find the yumserver repo.
To
test the yum server is configured properly or not then please run the
below command to installed the any packages on the server using yum
commands.
[root@localhost]# yum install samba*
When
you run this command, if all the packages related to yum are installed
that's means your YUM server installation and configuration are
successful. If you are see any error then please check the above all
steps configuration one by one.
No comments:
Post a Comment