Redhat 7.0 Installing the CentOS 7 Yum network source

Source: Internet
Author: User
Tags gpg

Redhat's update package only takes effect for registered users, so we manually change the update package to CentOS, which is almost the same as Redhat, so there's no need to worry about whether the package is installable, if there is a problem after installation, and that the CentOS company was Redhat last year. Acquisition, do not say crap, we still come to operate it!

1. First look at the Yum packages installed by the Redhat 7.0 system itself:

[Email protected] ~]# Rpm-qa | grep Yum
Yum-utils-1.1.31-24.el7.noarch

Yum-langpacks-0.4.2-3.el7.noarch

Yum-metadata-parser-1.1.4-10.el7.x86_64

Yum-rhn-plugin-2.0.1-4.el7.noarch

Packagekit-yum-0.8.9-11.el7.x86_64

Yum-3.4.3-118.el7.noarch

2. Delete these packages;

[Email protected] ~]# rpm-e yum-3.4.3-118.el7.noarch--nodeps

[Email protected] ~]# rpm-e yum-utils-1.1.31-24.el7.noarch--nodeps

[Email protected] ~]# rpm-e yum-rhn-plugin-2.0.1-4.el7.noarch--nodeps

[Email protected] ~]# rpm-e yum-metadata-parser-1.1.4-10.el7.x86_64--nodeps

[Email protected] ~]# rpm-e yum-langpacks-0.4.2-3.el7.noarch--nodeps

[Email protected] ~]# rpm-e packagekit-yum-0.8.9-11.el7.x86_64--nodeps

3, the computer must be able to access the Internet;

[[email protected] ~]# Ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) bytes of data.

Bytes from 8.8.8.8:icmp_seq=1 ttl=48 time=51.3 ms

Bytes from 8.8.8.8:icmp_seq=2 ttl=48 time=49.5 ms

4, enter the following Web site to see if the package version upgrade or find their own system of the corresponding package version updates;

NetEase 163 Network Source Address: http://mirrors.163.com/

CentOS Network Source Address:http://centos.ustc.edu.cn/centos/

5, find the version you need to download:

[email protected] ~]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm

[email protected] ~]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

[email protected] ~]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-24.el7.noarch.rpm

[email protected] ~]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-24.el7.noarch.rpm

[email protected] ~]# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm

6, check the download completed results;

[[email protected] ~]# ls

yum-3.4.3-118.el7.centos.noarch.rpm

yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm

yum-updateonboot-1.1.31-24.el7.noarch.rpm

yum-utils-1.1.31-24.el7.noarch.rpm

7. Install the package:

[Email protected] ~]# RPM-IVH yum-*

Warning:yum-3.4.3-118.el7.centos.noarch.rpm:header V3 rsa/sha256 Signature, key ID F4a80eb5:nokey

Preparing ... ################################# [100%]

Updating/installing ...

1:yum-metadata-parser-1.1.4-10.el7 ################################# [20%]

2:yum-plugin-fastestmirror-1.1.31-2################################# [40%]

3:yum-3.4.3-118.el7.centos ################################# [60%]

4:yum-updateonboot-1.1.31-24.el7 ################################# [80%]

5:yum-utils-1.1.31-24.el7 ################################# [100%

8, new repo configuration file;

[Email protected] ~]# Vim/etc/yum.repos.d/centos-base.repo

[Base]

name=centos-$releasever-base

baseurl=http://mirrors.sohu.com/centos/7/os/$basearch/

Gpgcheck=1


#released Updates

[Updates]

name=centos-$releasever-updates

baseurl=http://mirrors.163.com/centos/7/updates/$basearch/

Gpgcheck=1

Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7


#packages used/produced in the build and not released

[Addons]

name=centos-$releasever-addons

baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/

Gpgcheck=1

#gpgkey =http://mirrors.163.com/centos/rpm-gpg-key-centos-7

#additional packages that could be useful

[Extras]

name=centos-$releasever-extras

baseurl=http://mirrors.163.com/centos/7/extras/$basearch/

Gpgcheck=1

Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7

#additional packages that extend functionality of existing packages

[Centosplus]

name=centos-$releasever-plus

baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/

Gpgcheck=1

Enabled=0

9, the Yum network source has been installed to complete;

[email protected] ~]# Yum Clean all

10, test the installation is normal;

[Email protected] ~]# yum-y install zlib zlib-devel OpenSSL openssl-devel pcre pcre-devel

Loaded Plugins:fastestmirror, Product-id, Subscription-manager

This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.

Loading mirror speeds from cached hostfile

No Package Zlib-devel available.

No Package Pcre-devel available.

Resolving Dependencies

--Running Transaction check

---> Package openssl.x86_64 1:1.0.1e-34.el7 'll be updated

---> Package openssl.x86_64 1:1.0.1e-34.el7_0.7 would be a update

--processing dependency:openssl-libs (x86-64) = 1:1.0.1e-34.el7_0.7 for package:1:openssl-1.0.1e-34.el7_0.7.x86_ 64

---> Package openssl-devel.x86_64 1:1.0.1e-34.el7_0.7 'll be installed

--processing Dependency:zlib-devel (x86-64) for package:1:openssl-devel-1.0.1e-34.el7_0.7.x86_64

--processing Dependency:krb5-devel (x86-64) for package:1:openssl-devel-1.0.1e-34.el7_0.7.x86_64

--Running Transaction check


This article is from the "Technical Ideas" blog, please make sure to keep this source http://tsung.blog.51cto.com/3049036/1625814

Redhat 7.0 Install the Yum network source for CentOS 7

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.