Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been tasked with setting up PHP on a RHEL 6 server.

running yum install php gives me the following output:

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager 
Updating certificate-based repositories. 
Setting up Install Process 
No package php available. 
Error: Nothing to do

There are two files in /etc/yum.repos.d:


# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager


name=Red Hat Enterprise Linux $releasever - $basearch - Source

name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source

I've looked around and it seems that this is not the default configuration. I want to restore the RHEL6 repositories (which should include PHP 5.1, I believe). What can I do?

(updated in response to @ewwhite):

# rpm -qi php
package php is not installed
# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
repolist: 0
share|improve this question
What is the status of your subscription to the RHN? – Deer Hunter Mar 20 '13 at 4:56
Wups. It looks like this system's subscription is not valid (rhn_check -v echoes ERROR: unable to read system id.). – bdares Mar 20 '13 at 7:42
Nice to know you've found the issue. – Deer Hunter Mar 20 '13 at 8:58
up vote 0 down vote accepted

PHP is probably already installed on the system. Please check with:

rpm -qi php

You won't find much in the /etc/yum.repos.d/ tree on a RHEL system. You can view your subscribed repositories with yum repolist.

Also, please make sure the server has a valid Red Hat subscription and entitlement.

share|improve this answer
I've added the results of the queries you suggested. – bdares Mar 20 '13 at 2:38
Did you register your system with Red Hat? – ewwhite Mar 20 '13 at 5:19
No, I didn't. (Not my system.) Could you add that this may be due to an invalid subscription in your answer so I could accept it? – bdares Mar 20 '13 at 9:42
@bdares Sure. That's updated. – ewwhite Mar 20 '13 at 12:38

Your system doesn't appear to have a valid entitlement.

Register the system and assign it an active subscription to gain access to the Red Hat software repositories.

P.S. RHEL 6 ships with PHP 5.3.

share|improve this answer

Set enabled=1 in the repo file.

share|improve this answer
More detail will help make this a better answer. – Dave M Mar 20 '13 at 12:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.