≡ Menu

RHEL6 Beta: HowTo Use yum Command To Install Packages Without RHN

I'm testing Redhat Enterprise Linux 6 for our apps. However, RHN do not support beta RHEL 6 software. How do I use yum command to install additional software without using DVD ROM?

You need to enable beta repo by editing /etc/yum.repos.d/rhel-beta.repo file, enter:
# vi /etc/yum.repos.d/rhel-beta.repo
Make sure enable is set to 1:

[rhel-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch
#baseurl=ftp://ftp.redhat.com/pub/redhat/rhel/beta/$releasever/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-$releasever-beta&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
[rhel-beta-optional]
name=Red Hat Enterprise Linux $releasever Beta (Optional) - $basearch
#baseurl=ftp://ftp.redhat.com/pub/redhat/rhel/beta/$releasever/optional/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-optional-$releasever-beta&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta

Save and close the file. Now, you can access software without RHN for testing purpose under RHEL 6.0 beta.
# yum list | less
# yum search php

Sample outputs:

Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
=============================================================================================================== Matched: php ================================================================================================================
php.x86_64 : PHP scripting language for creating dynamic web sites
php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
...

You can install php as follows:
# yum install php
Sample outputs:

Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.2-3.el6 set to be updated
--> Processing Dependency: php-cli = 5.3.2-3.el6 for package: php-5.3.2-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.2-3.el6 for package: php-5.3.2-3.el6.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.3.2-3.el6 set to be updated
---> Package php-common.x86_64 0:5.3.2-3.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================
 Package            Arch           Version             Repository         Size
===============================================================================
Installing:
 php                x86_64         5.3.2-3.el6         rhel-beta         1.1 M
Installing for dependencies:
 php-cli            x86_64         5.3.2-3.el6         rhel-beta         2.2 M
 php-common         x86_64         5.3.2-3.el6         rhel-beta         515 k
Transaction Summary
===============================================================================
Install       3 Package(s)
Downloading Packages:
(1/2): php-cli-5.3.2-3.el6.x86_64.rpm                   | 2.2 MB     00:03
(2/2): php-common-5.3.2-3.el6.x86_64.rpm                | 515 kB     00:00
-------------------------------------------------------------------------------
Total                                          284 kB/s | 2.7 MB     00:09
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID f21541eb: NOKEY
rhel-beta/gpgkey                                        | 6.6 kB     00:00 ...
Importing GPG key 0xF21541EB "Red Hat, Inc. (beta key 2) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
Is this ok [y/N]: y
Importing GPG key 0x897DA07A "Red Hat, Inc. (Beta Test Software) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common-5.3.2-3.el6.x86_64                           1/3
  Installing     : php-cli-5.3.2-3.el6.x86_64                              2/3
  Installing     : php-5.3.2-3.el6.x86_64                                  3/3
Installed:
  php.x86_64 0:5.3.2-3.el6
Dependency Installed:
  php-cli.x86_64 0:5.3.2-3.el6         php-common.x86_64 0:5.3.2-3.el6
Complete!
Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 20 comments… add one }

  • Majick Mann July 16, 2010, 1:19 pm

    This was part of the installation. Not sure how the beta repo would not be there.

  • Alan C January 13, 2011, 5:40 pm

    Setting “enabled=1″ is not sufficient. I made this change, and still cannot use “yum list” or other commands. I’m running the most current 64 bit version of RHEL6 beta.

  • Deborah Dawicki May 7, 2011, 9:41 pm

    these mirror and baseurls do not exist! I tried it, and it did not work

  • Primus May 30, 2011, 11:34 am

    Worked like a charm. Thanks.

  • kris June 2, 2011, 10:51 am

    it doesn’t work for me , error :

    Loaded plugins: rhnplugin
    This system is not registered with RHN.
    RHN support will be disabled.
    rhel-beta/metalink | 19 kB 00:00
    Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=rhel-6Server-beta&arch=x86_64 error was
    No repomd file
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-beta. Please verify its path and try again

  • l0l June 7, 2011, 3:10 pm

    it doesn’t work for me.
    1/ I enabled as the following:

    [rhel-source]
    name=Red Hat Enterprise Linux $releasever - $basearch - Source
    baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    [rhel-source-beta]
    name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
    baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    --- when run 'yum list | less'
    Got error:
    Loaded plugins: refresh-packagekit, rhnplugin
    ftp://ftp.redhat.com/pub/redhat/linux/beta/6Server/en/os/SRPMS/repodata/repomd.xml: [Errno 14] PYCURL ERROR 9 - "Server denied you to change to the given directory"
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-source-beta. Please verify its path and try again
    2/ when I change the mirror as yours:
    [rhel-source]
    name=Red Hat Enterprise Linux $releasever - $basearch - Source
    # baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-$releasever-beta&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    [rhel-source-beta]
    name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
    # baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-optional-$releasever-beta&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    But got error:
    Loaded plugins: refresh-packagekit, rhnplugin
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-source. Please verify its path and try again
    Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=rhel-6Server-beta&arch=x86_64 error was
    No repomd file
    3/ Then I cp your rhel-source.repo, but still got error:
    Loaded plugins: refresh-packagekit, rhnplugin
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-beta. Please verify its path and try again
    Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=rhel-6Server-beta&arch=x86_64 error was
    No repomd file
    
  • Nitin June 17, 2011, 9:14 am

    I tried to changed by the same way in packagekit-media.repo file in the same directory and i rhink it worked

    • Prasanna July 20, 2011, 12:26 pm

      could you paste the contents of packagekit-media.repo file?

  • Big Jio July 27, 2011, 4:49 pm

    Thanx a lot! It work with me

  • carl August 3, 2011, 2:45 pm

    The instructions are for the beta with following /etc/yum.repos.d/rhel-beta.repo RHEL6 non beta sees the repositories. I’m not sure if they’ll work

    [rhel-beta]
    name=Red Hat Enterprise Linux $releasever Beta - $basearch
    #baseurl=ftp://ftp.redhat.com/pub/redhat/rhel/beta/$releasever/$basearch/os/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-6-beta&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
    [rhel-beta-optional]
    name=Red Hat Enterprise Linux $releasever Beta (Optional) - $basearch
    #baseurl=ftp://ftp.redhat.com/pub/redhat/rhel/beta/$releasever/optional/$basearch/os/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-optional-6-beta&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
    
  • vijay August 29, 2011, 9:38 am

    please give all linux command send

  • hemanta das September 27, 2011, 4:50 pm

    i want to work on the red hat basis.so i want to know all the killer commands of red hat.
    please send me the commands

  • vijay October 1, 2011, 3:36 am

    i am just learning linux

  • Jayaram prasad December 9, 2011, 5:27 am

    When am trying with RHEL-5 same error occurring….

    [root@Zion-219 yum.repos.d]# yum install wget samba
    Loading “rhnplugin” plugin
    Loading “installonlyn” plugin
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up Install Process
    Setting up repositories
    Reading repository metadata in from local files
    Parsing package install arguments
    No Match for argument: wget
    No Match for argument: samba
    Nothing to do
    vi /etc/yum.repos.d/rhel-debuginfo.repo

    [rhel-debuginfo]
    name=Red Hat Enterprise Linux $releasever – $basearch – Debug
    baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    Any suggestions ??

  • Manjushree December 12, 2011, 5:58 am

    It didnt work for me. When i type the path vi /etc/yum.repos.d/rhel-beta.repo

    the file doesnt exist . Any suggestions ?

    • Chankey Pathak December 14, 2011, 5:20 pm

      Yes the file will be empty. You will have to write there. Use the command from root or use sudo.

  • Chankey Pathak December 14, 2011, 5:21 pm

    Didn’t work.

    Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=rhel-6Server-beta&arch=x86_64 error was
    No repomd file
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-beta. Please verify its path and try again

  • dilip kumar August 16, 2012, 4:01 am

    I have learned red hat. that’s why I know what’s the value of red hat.

  • Mike April 9, 2014, 4:00 pm

    This will not work. You cant use RHN repos without a valid RHN subscription.

    The best workaround is to use the CentOS repo that correspond with your current rhel version. i.e. CentOS 6 repo with rhel 6.

  • vetri August 10, 2014, 4:54 pm

    how to install the development tools for rhel6.4 ,please tell me [root@localhost ~]# yum groupinstall ‘Development Tools’
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Setting up Group Process
    Warning: Group Development Tools does not exist.
    No packages in any requested group available to install or update
    [root@localhost ~]#

Leave a Comment