rhel7.2 yum uses CentOS update package

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).

  1. Mount the local CD to the system: put the rhel7.2 installation CD into the CD drive and operate under the terminal command line
    mkdir /run/media/rhel #New mount directory
    mount /dev/cdrom /run/media/rhel #Mount the CD to the /run/media/rhel directory
    cd /run/media/rhel #Enter the mount directory
    ls #View the mount directory, the CD is successfully mounted

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

rhel7.2 yum uses CentOS update package
Centos8 uses yum to install mongodb 4.2 method
Centos7 uses yum to install pip, ipython
CentOS 6/7 update curl
Centos7 uses yum to install Apache, mariadb, PHP
Centos7 YUM install MariaDB 10.0
CentOS server deployment (YUM)
CentOS 7.2 Yum install MySQL 5.6
Centos7 YUM install MariaDB 10.0
CentOS 5 to CentOS 5.8 YUM source
centos install mysql through yum
Centos 6.10 reinstall python and yum
Centos7 decompress nodejs compressed package
RHEL CentOS 8 SSH two-factor authentication
CentOS 7 yum install PHP7.3 tutorial
Update gcc to 6.4.0 in centos