我一直负责在RHEL 6服务器上设置PHP。
运行yum install php给我以下输出:
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
/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
我环顾四周,似乎这不是默认configuration。 我想恢复RHEL6存储库(应该包括PHP 5.1,我相信)。 我能做什么?
(更新为@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
PHP可能已经安装在系统上。 请检查:
rpm -qi php
在RHEL系统上的/etc/yum.repos.d/树中找不到太多内容。 你可以用yum repolist查看你订阅的版本库。
此外,请确保服务器有一个有效的红帽订阅和权利。
您的系统似乎没有有效的权利。
注册系统并为其分配一个活动订阅,以访问红帽软件存储库。
PS RHEL 6附带PHP 5.3。
在回购文件中设置enabled = 1。