9 Replies Latest reply: Apr 17, 2014 4:46 PM by Dude! RSS

    YUM setup on non-internet server


      Simple question; is it possible to setup and use YUM on a server without internet connection ? If yes, how ?


      What I mean is : download stuff on computer, FTP to server, install

        • 1. Re: YUM setup on non-internet server

          As far as I know, the yum utility only works with http. This is different than a network install using Anaconda. However, why bother to setup a web server to provide a yum repository. It will be much easier to simply use a local yum repository. You can use a DVD, copy the content of the DVD or share it using NFS.


          Here is perhaps an interesting post: Using YUM for Oracle Linux 6

          • 2. Re: YUM setup on non-internet server

            ... in the context of your question. Of course you can use yum also with the local filesystem or with a locally mounted network share. I did some testing in the past with sshfs and it worked fine.

            • 3. Re: YUM setup on non-internet server
              M Kapur-Oracle

              You could mount Oracle Linux DVD and configure it as a local repository for yum. Steps:


              1) # mkdir /OL6DVD

              2) Assuming /dev/sr0 is the device name used by Oracle Linux DVD:
              # mount /dev/sr0 /OL6DVD

              3) Verify it is mounted properly:

              # cd /OL6DVD/
              # ls

              4) Setup yum repository by creating local.repo  as shown below. Make sure you don't have any other .repo files in /etc/yum.repos.d/ directory.

              # cat /etc/yum.repos.d/local.repo


              name=OL6u3 DVD Repository


              5) Import Keys:

              # rpm --import /OL6DVD/RPM-GPG-KEY

              # rpm --import /OL6DVD/RPM-GPG-KEY-oracle

              6) Verify that local repository is now setup correctly:

              # yum repolist

              Install packages from local repository if it has been setup correctly using 'yum install' command

              • 4. Re: YUM setup on non-internet server

                You can actually use /dev/cdrom to access the DVD. The repository configuration should point to the "server" directory. The yum repository configuration to read from the DVD drive is also explained in the Oracle Linux release notes, chapter 3.2.3 https://oss.oracle.com/el6/docs/RELEASE-NOTES-U5-en.html

                • 5. Re: YUM setup on non-internet server

                  OK, I need to go through this with some more in detail, but I understand that YUM can be configured to read from filesystem (not only being DVD, but anything), instead of the internet connection to a cloud-YUM-repository.


                  In this case, I needed to install only ONE package/RPM, but the issue I have with the DVD repository : that is a fixed repository. Who's going to update that ? Who says it even stores what I need ? I was looking for this one package on "the internet", then just FTP to local system, and install it, using RPM or whatever. But I understand this can be done with YUM as well, albeit not the default method.

                  • 6. Re: YUM setup on non-internet server

                    Yum can also install local rpm files. You can download a rpm package and use yum localinstall /path/to/package.rpm. Yum realizes that you are using a local RPM package and won't connect to the Internet, unless the package you are installing has any software dependencies for which it will query the repository. You can also download required software dependencies the same way prior to installing your final software package.


                    Btw, you do not want to use the rpm utility to install software since, unlike yum, it does not resolve software dependencies and does not prevent you from destroying your system.

                    • 7. Re: YUM setup on non-internet server
                      Atif Iqbal

                      You can setup local repository for your ISO Disk or location on your Disk. Please refer below article to setup one.


                      2.9 Creating a Local Yum Repository Using an ISO Image

                      • 8. Re: YUM setup on non-internet server

                        I sort of understood that RPM was not really designed for DBA's who also need to apply OS patches to the OS, because the tool is not very friendly.


                        Unlike YUM, which is great.

                        • 9. Re: YUM setup on non-internet server

                          Yum is a front-end for rpm which maintains it's own database to determine software dependencies. It was introduced with RHEL version 5.