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/
Verify your packages using ~]#yum list all
to know about any package and its usage
~]#yum info dhcp-common
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
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
This command lists any obsoleting relationships between any available package and any installed package.
This command lists any package in an enabled repository which is an update for any installed package.
This command lists any package added to any enabled repository in the last seven(7) days.
This cleans up any cached packages in any enabled repository cache directory.
This cleans up any xml metadata that may have been cached from any enabled repository.
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.
Clean all cached files from any enabled repository. Useful to run from time to time to make sure there is nothing using unnecessary space.
Recent Comments