How to: Enable and Install (updates/rmps) in RHEL6 without RHNs ?

I have installed RHEL6 (Redhat Enterprised Linux 6) on my machine, its working fine and its just the thing I want. But, unlike Ubuntu or any other linux based OS (expect CentOS,its quite similar to RetHat),  the updates from Redhat aren’t that easy to get. You have to be registered to RHN (RedHat Network) to get updates.


To install rpms or update any rpm we use “YUM” command. This command might be alittle new to many linux users but its a nice little command for Redhat (CentOS too) that basically handles all of  the installing/uninstalling processes. The thing I love about Yum command is that it handles pretty much everything during installation like dependencies and all. Also you can use this command to update and even group install the defined packages.

Yum installs rpm located on a specific folder, where the user downloads and preserves all his rpms. This folder is configured to yum by specifying the path in/etc/yum.repos.d/[name].repo.

The basic format of the repo file is:

This configuration tells the yum commad to file the rpm from the specified path. Well, if you want to install, lets say, php5  on your machine, then unless there’s an rpm named so, you wont be able to install the desired rpm. Unlike in Ubuntu, sudo apt-get install php5 will do the trick.
If you have RHEL6, then the updates after the release of OS wont be available to you unless you are configured to RHN.

So, what do we need to do? Well, the process it quite simple:

First you’ll have to download these two rpms: epel-release and remi-release.

You can get the epel-release for RHEL6 from the link

Download the file and install it using command as a root (in the folder containing the rpm):

rpm -Uvh epel-release-6-5.noarch.rpm

For the second one, you can download the remi-release for RHEL6 from the link

Download the file and install it using command as a root(in the folder containing the rpm):

rpm -Uvh remi-release-6.rpm

The order of install is necessary, because the installation of remi is dependent on epel release.

Now that you have installed remi, an new repo file will be created on /etc/yum.repos.d/remi.repo.Now edit that file, and under [remi] there is parameter called enabled. Change its value to 1 if its set to 0. This will activate the remi.repo file.

Now you will be able to install rpms without having to worry about (not almost but) pretty much everything.

Now, here is guide to install php5 in Redhat:

1. yum install php

Intalling php

Now, remi will search for php (latest version available) and install it using yum.

2. php -v


After the installation, this command will display you the version of php installed.

This will mark the completion of installation. So, there you go, now you should be able use yum command to install any rpm as required 🙂

  • pirate

    I just now installed RHEL 6 , my system is connected to internet … now when i try to run the yum install telnet-server …… it says package not found .. now by mistake i uninstalled firefox …… now when i try to install it back using yum install firefox …. again it says no package found ….. i mean this was not the case when i tried installing stuff using yum command in my college lab …….

    plz guide to fix this ….. reply asap ……

    • Sushant Kafle

      yum in RHEL looks for packages from the Base Url of the active repo. All the yum repo information are located in /etc/yum.repos.d .In your case, yum is not working probably because the repos are not configured. If you have a dvd containing packages(rpms), mount it first, create a repo file (local.repo) and this to the file:
      Please check if other repo’s are active as well. If so, disable them for now. (set enabled=0)

      If this doesn’t work, please try the tutorial given above. And if that fails, look for the rpm online and download them.
      Install the rpm-s using rpm -ivh location_of_rpm

      • pirate

        ok great …. i got it right now …… but now during virtualization , i get the following error :

        Error polling connection ‘qemu:///system’: internal error Cannot find suitable emulator for x86_64

        Traceback (most recent call last):
        File “/usr/share/virt-manager/virtManager/”, line 440, in _tick
        File “/usr/share/virt-manager/virtManager/”, line 1414, in tick
        newNets, self.nets) = self._update_nets()
        File “/usr/share/virt-manager/virtManager/”, line 1277, in _update_nets
        lookup_func, build_class)
        File “/usr/share/virt-manager/virtManager/”, line 1209, in _poll_helper
        if not check_support():
        File “/usr/share/virt-manager/virtManager/”, line 501, in is_network_capable
        File “/usr/lib/python2.6/site-packages/virtinst/”, line 574, in check_conn_support
        return _check_support(conn, feature, conn)
        File “/usr/lib/python2.6/site-packages/virtinst/”, line 443, in _check_support
        actual_drv_ver = _hv_ver(conn, uri)
        File “/usr/lib/python2.6/site-packages/virtinst/”, line 376, in _hv_ver
        ret = cmd(*args)
        File “/usr/lib64/python2.6/site-packages/”, line 2823, in getVersion
        if ret == -1: raise libvirtError (‘virConnectGetVersion() failed’, conn=self)
        libvirtError: internal error Cannot find suitable emulator for x86_64

        plz help me get rid of this :

        • Sushant Kafle

          I think the problem (with the emulator) is either because your machine doesn’t support virtualization or the machine has disabled (not enabled) virtualization.

          For the second problem, you need to go to your BIOS and enable the virtualization.

  • Rakesh Vijayan

    I followed your instruction but its lead me to this
    any Idea about it . I am bookmaked this page now for getting solution
    [root@localhost ~]# yum install php

    Loaded plugins: product-id, security, subscription-manager

    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

    [root@localhost ~]#