{"id":6153,"date":"2016-08-07T15:47:18","date_gmt":"2016-08-07T07:47:18","guid":{"rendered":"http:\/\/rmohan.com\/?p=6153"},"modified":"2016-08-07T15:47:18","modified_gmt":"2016-08-07T07:47:18","slug":"local-yum-server-installation-and-configuration-rhel7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6153","title":{"rendered":"Local YUM server installation and configuration &#8211; RHEL7"},"content":{"rendered":"<p><span class=\"_Tgc\">The Yellowdog Updater, Modified (<b>yum<\/b>) is an open-source command-line package-management utility for Linux operating systems using the RPM Package Manager. Though <b>yum<\/b> has a command-line interface, several other tools provide graphical user interfaces to <b>yum<\/b> functionality.<\/span><\/p>\n<p><span class=\"_Tgc\">\u00a0\u00a0 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.<\/span><br \/>\n<span class=\"_Tgc\"><br \/>\n<\/span><span class=\"_Tgc\"><br \/>\n<\/span>To build your local YUM server first you have copy all the packages from Installation media (RHEL 7 DVD).<\/p>\n<p>Make one directory to copy the RPM&#8217;s<\/p>\n<p>~]#mkdir \/rpms<br \/>\n~]#cp -v \/run\/media\/root\/RHEL7\/Packges\/* \/rpms<\/p>\n<p>After completion of copying the packages to \/rpms directory.<\/p>\n<p>install createrepo RPM<br \/>\n~]# rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm<\/p>\n<p>After installation of above package edit the yum configuration file then add the following configuration lines.<\/p>\n<p>~]# cat \/etc\/yum.repos.d\/redhat.repo<br \/>\n[rhel7-tutorial]<br \/>\nname=rhel7-tutorial<br \/>\nbaseurl=file:\/\/\/rpms<br \/>\ngpgcheck=0<br \/>\nenabled=1<\/p>\n<p>now create repository using below command<\/p>\n<p>~]#createrepo \/rpms\/<\/p>\n<p><b>OR<\/b><br \/>\n<b>\u00a0<\/b><br \/>\nyou can also use<\/p>\n<p>Change the directory path to \/rpms then run below command<\/p>\n<p>rpms]#createrepo &#8211;database \/rpms\/<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/08\/download.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6154\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/08\/download.png\" alt=\"download\" width=\"513\" height=\"221\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download.png 513w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-300x129.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-150x65.png 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-400x172.png 400w\" sizes=\"(max-width: 513px) 100vw, 513px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Verify your packages using ~]#yum list all<\/p>\n<p>to know about any package and its usage<\/p>\n<p>~]#yum info dhcp-common<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/08\/download-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6157\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/08\/download-1.png\" alt=\"download (1)\" width=\"896\" height=\"358\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-1.png 896w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-1-300x120.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-1-768x307.png 768w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-1-150x60.png 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-1-400x160.png 400w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/08\/download-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6155\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2016\/08\/download-2.png\" alt=\"download (2)\" width=\"1022\" height=\"161\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-2.png 1022w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-2-300x47.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-2-768x121.png 768w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-2-150x24.png 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2016\/08\/download-2-400x63.png 400w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/a><\/p>\n<p>earch for particular package name so that it will give you list of packages which are available in the repository<\/p>\n<p>~]#yum list installed<br \/>\nCheck your installed packages using above command<\/p>\n<p>~]#yum remove PackageName<br \/>\nRemove mentioned package and its dependencies from server<\/p>\n<div class=\"wiki\">~]#yum list extras<\/div>\n<blockquote><p>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<\/p><\/blockquote>\n<div class=\"wiki\">~]#yum list obsoletes<\/div>\n<blockquote><p>This command lists any obsoleting relationships between any available package and any installed package.<\/p><\/blockquote>\n<div class=\"wiki\">~]#yum list updates<\/div>\n<blockquote><p>This command lists any package in an enabled repository which is an update for any installed package.<\/p><\/blockquote>\n<div class=\"wiki\">~]#yum list recent<\/div>\n<blockquote><p>This command lists any package added to any enabled repository in the last seven(7) days.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<div class=\"wiki\">~]#yum clean packages<\/div>\n<blockquote>\n<blockquote><p>This cleans up any cached packages in any enabled repository cache directory.<\/p><\/blockquote>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<div class=\"wiki\">~]#yum clean metadata<\/div>\n<blockquote>\n<blockquote>\n<blockquote><p>This cleans up any xml metadata that may have been cached from any enabled repository.<\/p><\/blockquote>\n<\/blockquote>\n<\/blockquote>\n<div class=\"wiki\">~]#yum clean dbcache<\/div>\n<blockquote>\n<blockquote>\n<blockquote><p>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.<\/p><\/blockquote>\n<\/blockquote>\n<\/blockquote>\n<div class=\"wiki\">~]#yum clean all<\/div>\n<blockquote>\n<blockquote><p>Clean all cached files from any enabled repository. Useful to run from time to time to make sure there is nothing using unnecessary space.<\/p><\/blockquote>\n<\/blockquote>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n<p> Basically we will YUM to resolve the dependencies automatically and install them, Using YUM repository you can lot [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6153"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6153"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6153\/revisions"}],"predecessor-version":[{"id":6158,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6153\/revisions\/6158"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}