Dual system Redhat 7.5 update yum source (centos) + gcc installation

Keywords: CentOS yum RPM network

Redhat 7.5 update yum yuan

redhat 7.5 update centos yum source

My environment is win10+Redat 7.5 dual system. Because the image I found on the Internet is installed on a U disk, it is a red hat system without registration. So here we use the yum source of centos system

Installation steps (there must be a net)

1. View the yum source provided by the system and delete it

1.rpm -qa | grep yum 								##Display the existing yum source of the system
2.rpm -qa | grep yum | xargs rpm -e --nodeps			##Delete all yum sources

2. Go to the network source to download the rpm package

Alicloud network source address: https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/
Netease 163 network source address: http://mirrors.163.com/
CentOS network source address: http://centos.ustc.edu.cn/centos/

Here I choose to go to alicloud to download and find the following five yum sources

  1. yum-3.4.3-158.el7.centos.noarch.rpm
  2. yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
  3. yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
  4. yum-updateonboot-1.1.31-45.el7.noarch.rpm
  5. yum-utils-1.1.31-45.el7.noarch.rpm

3. Install the downloaded yum source (find the file location and open in Terminal)

1. rpm -ivh yum-*						##Install the latest yum source
2. rpm -qa | grep yum 					##Check whether the yum source is installed successfully

4. Create a new. repo file

[root@localhost Downloads]# vim /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-releasever−Basebaseurl=http://mirrors.163.com/centos/7/os/releasever - Base baseurl=http://mirrors.163.com/centos/7/os/releaseverBasebaseurl=http://mirrors.163.com/centos/7/os/basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-releasever−Updatesbaseurl=http://mirrors.163.com/centos/7/updates/releasever - Updates baseurl=http://mirrors.163.com/centos/7/updates/releaseverUpdatesbaseurl=http://mirrors.163.com/centos/7/updates/basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-releasever−Extrasbaseurl=http://mirrors.163.com/centos/7/extras//releasever - Extras baseurl=http://mirrors.163.com/centos/7/extras//releaseverExtrasbaseurl=http://mirrors.163.com/centos/7/extras//basearch/
gpgcheck=1 gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-releasever−Plusbaseurl=http://mirrors.163.com/centos/7/centosplus//releasever - Plus baseurl=http://mirrors.163.com/centos/7/centosplus//releaseverPlusbaseurl=http://mirrors.163.com/centos/7/centosplus//basearch/
gpgcheck=1
enabled=0

Write above

5. Verify that the installation is successful

The new system does not have gcc. We can verify it by installing gcc

yum -y install gcc  
yum -y install gcc-c++  

End

Posted by Skyphoxx on Mon, 16 Dec 2019 07:24:54 -0800