The update package of redhat is only effective for registered users, so we manually change it to the update package of CentOS. CentOS is almost the same as redhat, so there is no need to worry about whether the package can be installed or whether there are problems after installation.
First delete the original yum of redhat, because the original yum of redhat is not registered as a redhat user and cannot be used, enter the following command line:
The update package of redhat is only effective for registered users, so we manually change it to the update package of CentOS. CentOS is almost the same as redhat, so there is no need to worry about whether the package can be installed or whether there are problems after installation.
1、 First delete the original yum of redhat, because the original yum of redhat is not registered as a redhat user.
rpm -aq|grep yum|xargs rpm -e --nodeps
rpm -aq|grep python-iniparse|xargs rpm -e --nodeps 12
2、 Download the yum installation package of 163
subscription-manager is a tool for managing system software. If you want redhat to purchase an account, you can use yum after entering the account information, http://linux.die.net/man/8/subscription-manager, see here for details.
subscription-manager is a client program that registers a system with the Certificate-Based Red Hat Network. To register your system with RHN Classic or with an RHN Satellite 5.x system, then use the rhn_register tool.
Red Hat provides content updates and support by issuing subscriptions for its products. These subscriptions are allocated to systems (machines); once a system is subscribed to content, it is entitled to install and update that software product. IT administrators need to track these subscriptions and how they are assigned. This entitlement and subscription management is a feature available for Red Hat platforms version 5.7 (and later) and version 6.1 (and later).
There are indeed changes in the registration area. The early versions of the previous 6 generally used commands such as rhn_register to manage registration, and the later versions of the 6 included 7 registered with the subscription-manager
redhat.repo is only used after registration, usually we are private local repo, generally not used
And redhat.repo does not need to be changed manually, generally through subscription-manager
That file is indeed related to registration. The channels you enable will be automatically generated in that file after you register.
Two, configure the local yum source
cd/etc/yum.repos.d/ #Enter yum configuration directory
touch rhel-media.repo #Establish yum configuration file
vi rhel-media.repo #Edit the configuration file and add the following
[ rhel-media]
name=Red Hat Enterprise Linux 7.2
baseurl=file:///run/media/rhel
enabled=1
gpgcheck=1
gpgkey=file:///run/media/rhel/RPM-GPG-KEY-redhat-release
3. Clear the yum cache and use yum install to automatically install the software
yum clean all #Clear yum cache
yum install php #install php
Recommended Posts