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
:
redhat.repo:
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
rhel-source.repo:
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=0
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=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
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
Best Answer
PHP is probably already installed on the system. Please check with:
You won't find much in the
/etc/yum.repos.d/
tree on a RHEL system. You can view your subscribed repositories withyum repolist
.Also, please make sure the server has a valid Red Hat subscription and entitlement.