November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Local YUM server installation and configuration – RHEL7

The Yellowdog Updater, Modified (yum) is an open-source command-line package-management utility for Linux operating systems using the RPM Package Manager. Though yum has a command-line interface, several other tools provide graphical user interfaces to yum functionality.

   Basically we will YUM to resolve the dependencies automatically and install them, Using YUM repository you can lot of time to install the packages and its dependencies.


To build your local YUM server first you have copy all the packages from Installation media (RHEL 7 DVD).

Make one directory to copy the RPM’s

~]#mkdir /rpms
~]#cp -v /run/media/root/RHEL7/Packges/* /rpms

After completion of copying the packages to /rpms directory.

install createrepo RPM
~]# rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm

After installation of above package edit the yum configuration file then add the following configuration lines.

~]# cat /etc/yum.repos.d/redhat.repo
[rhel7-tutorial]
name=rhel7-tutorial
baseurl=file:///rpms
gpgcheck=0
enabled=1

now create repository using below command

~]#createrepo /rpms/

OR
 
you can also use

Change the directory path to /rpms then run below command

rpms]#createrepo –database /rpms/

 

 

download

 

 

Verify your packages using ~]#yum list all

to know about any package and its usage

~]#yum info dhcp-common

 

 

 

download (1)

 

download (2)

earch for particular package name so that it will give you list of packages which are available in the repository

~]#yum list installed
Check your installed packages using above command

~]#yum remove PackageName
Remove mentioned package and its dependencies from server

~]#yum list extras

This command lists any installed package which no longer appears in any of your enabled repositories. Useful for finding packages which linger between upgrades or things installed not from a repo

~]#yum list obsoletes

This command lists any obsoleting relationships between any available package and any installed package.

~]#yum list updates

This command lists any package in an enabled repository which is an update for any installed package.

~]#yum list recent

This command lists any package added to any enabled repository in the last seven(7) days.

 

~]#yum clean packages

This cleans up any cached packages in any enabled repository cache directory.

 

~]#yum clean metadata

This cleans up any xml metadata that may have been cached from any enabled repository.

~]#yum clean dbcache

Yum will create or download some sqlite database files as part of its normal operation. This command clean up the cached copies of those from any enabled repository cache.

~]#yum clean all

Clean all cached files from any enabled repository. Useful to run from time to time to make sure there is nothing using unnecessary space.

 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>