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

by on July 15, 2010 · 19 comments· LAST UPDATED July 15, 2010

in

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!
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 19 comments… read them below or add one }

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

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

Reply

2 Alan C January 13, 2011 at 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.

Reply

3 Deborah Dawicki May 7, 2011 at 9:41 pm

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

Reply

4 Primus May 30, 2011 at 11:34 am

Worked like a charm. Thanks.

Reply

5 kris June 2, 2011 at 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

Reply

6 l0l June 7, 2011 at 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

Reply

7 Nitin June 17, 2011 at 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

Reply

8 Prasanna July 20, 2011 at 12:26 pm

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

Reply

9 Big Jio July 27, 2011 at 4:49 pm

Thanx a lot! It work with me

Reply

10 carl August 3, 2011 at 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

Reply

11 vijay August 29, 2011 at 9:38 am

please give all linux command send

Reply

12 hemanta das September 27, 2011 at 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

Reply

13 vijay October 1, 2011 at 3:36 am

i am just learning linux

Reply

14 Jayaram prasad December 9, 2011 at 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 ??

Reply

15 Manjushree December 12, 2011 at 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 ?

Reply

16 Chankey Pathak December 14, 2011 at 5:20 pm

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

Reply

17 Chankey Pathak December 14, 2011 at 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

Reply

18 dilip kumar August 16, 2012 at 4:01 am

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

Reply

19 Mike April 9, 2014 at 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.

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: