{"id":2391,"date":"2012-05-12T05:29:04","date_gmt":"2012-05-11T21:29:04","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2391"},"modified":"2023-04-28T09:49:18","modified_gmt":"2023-04-28T09:49:18","slug":"how-to-setup-local-yum-repository-from-cd-romdvd-rom-image-on-fedora-16","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-setup-local-yum-repository-from-cd-romdvd-rom-image-on-fedora-16\/","title":{"rendered":"How to Setup Local Yum Repository from CD-ROM\/DVD-ROM image on Fedora 16"},"content":{"rendered":"<p>In this post, i will share on how to install, update and remove RPM packages from CD-ROM\/DVD-ROM image or local yum repository on linux Fedora 16 server. This will very useful when you are running on slow internet connection. Instead of go through the internet connection, it is possible to use local repository to install the module and package. Follow these steps to setup your local CD-ROM\/DVD-ROM yum repository on linux Fedora 16 server.<\/p>\n<p>1. Mount your DVD into \/mnt or \/media. It&#8217;s depend on you.<\/p>\n<pre>\n[root@fedora16 ~]# mount \/dev\/cdrom \/mnt\nmount: block device \/dev\/sr0 is write-protected, mounting read-only\n<\/pre>\n<p>2. Enter to \/mnt directory and list out the files :<\/p>\n<pre>\n[root@fedora16 ~]# cd \/mnt\n[root@fedora16 mnt]# ls\nGPL       RPM-GPG-KEY-fedora               RPM-GPG-KEY-fedora-ppc    RPM-GPG-KEY-fedora-sparc64\nimages    RPM-GPG-KEY-fedora-16-primary    RPM-GPG-KEY-fedora-ppc64  RPM-GPG-KEY-fedora-x86_64\nisolinux  RPM-GPG-KEY-fedora-16-secondary  RPM-GPG-KEY-fedora-s390   TRANS.TBL\nPackages  RPM-GPG-KEY-fedora-arm           RPM-GPG-KEY-fedora-s390x\nrepodata  RPM-GPG-KEY-fedora-i386          RPM-GPG-KEY-fedora-sparc\n<\/pre>\n<p>3. Create files fedora16.repo under \/etc\/yum.repos.d and enter the following lines :<\/p>\n<pre>\n[root@fedora16 ~]# vi \/etc\/yum.repos.d\/fedora16.repo\n<\/pre>\n<p>Enter these lines in fedora16.repo :<\/p>\n<pre>\n[Fedora16-Repository]\nname=DVD-Fedora16 Repository\nbaseurl=file:\/\/\/mnt\nenabled=1\ngpgcheck=0\n<\/pre>\n<p>Please proceed to step 4 &#8211; step 8 when you perform yum command to install the package or module and get the following error :<\/p>\n<pre>\nError: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. \nPlease verify its path and try again\n<\/pre>\n<p>4. Create repo.disabled inside \/etc\/yum.repos.d :<\/p>\n<pre>\n[root@fedora16 ~]# mkdir \/etc\/yum.repos.d\/repo.disabled\n<\/pre.\n\n5. By default of minimal installation of Fedora 16 server, there are 3 file in \/etc\/yum.repos.d. fedora16.repos is the file the i created above steps (3), then the number of all repo files should be 4 files. Just keep the file fedora16.repo in \/etc\/yum.repos.d. \n\nList out the files and directory in \/etc\/yum.repos.d as below :\n<pre>\n[root@fedora16 ~]# ls \/etc\/yum.repos.d\/\nfedora16.repo fedora.repo  fedora-updates.repo  fedora-updates-testing.repo  repo.disabled\n<\/pre>\n<p>6. Then moved all these 3 repo files into &#8220;repo.disabled&#8221; folder :<\/p>\n<pre>\n[root@fedora16 ~]# mv \/etc\/yum.repos.d\/fedora.repo \/etc\/yum.repos.d\/repo.disabled\n[root@fedora16 ~]# mv \/etc\/yum.repos.d\/fedora-updates.repo \/etc\/yum.repos.d\/repo.disabled\n[root@fedora16 ~]# mv \/etc\/yum.repos.d\/fedora-updates-testing.repo \/etc\/yum.repos.d\/repo.disabled\n<\/pre>\n<p>7. List out the updated files and folders inside \/etc\/yum.repos.d :<\/p>\n<pre>\n[root@fedora16 ~]# ls -l \/etc\/yum.repos.d\/\ntotal 8\n-rw-r--r--. 1 root root   92 Mar 18 00:09 fedora16.repo\ndrwxr-xr-x. 2 root root 4096 Mar 18 01:27 repo.disabled\n<\/pre>\n<p>Note : Only file fedora16.repo and folder repo.disabled should be exist.<\/p>\n<p>8. Run yum clean all to clear up your yum cache directory :<\/p>\n<pre>\n[root@fedora16 ~]# yum clean all\n<\/pre>\n<pre>\nCleaning repos: Fedora16-Repository\nCleaning up Everything\n<\/pre>\n<p>9. Steps completed. You can start using yum command as usual.<\/p>\n<pre>\n[root@fedora16 ~]# yum install module\/package\n[root@fedora16 ~]# yum update module\/package\n[root@fedora16 ~]# yum remove module\/package\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this post, i will share on how to install, update and remove RPM packages from CD-ROM\/DVD-ROM image or local yum repository on linux Fedora 16 server. This will very&#8230;<\/p>\n","protected":false},"author":6,"featured_media":2351,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2057,2062],"tags":[1371,1536,1546,1944],"class_list":["post-2391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fedora","category-yum","tag-fedora-16","tag-linux","tag-linux-utilities","tag-yum-repositories"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=2391"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2391\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/2351"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=2391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}