Home > Operation and Maintenance > CentOS > centos7 replaces domestic yum source

centos7 replaces domestic yum source

王林
Release: 2020-08-03 17:11:20
forward
9804 people have browsed it

centos7 replaces domestic yum source

Specific steps:

(Recommended tutorial: centos tutorial)

1. Backup

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
Copy after login

Or

mv /etc/yum/repos.d/CentOS-Base.repo{,.date -I}
Copy after login

2. Download the new CentOS-Base.repo to /etc/yum.repos.d/

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
Copy after login

or

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
Copy after login

CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Copy after login

or

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Copy after login

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
Copy after login

or

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
Copy after login

(video tutorial Recommended: linux video tutorial)

3. Add EPEL

CentOS 6

wget -O /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repo
Copy after login

CentOS 7

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
Copy after login

4. Clean cache And generate a new cache

yum clean all
yum makecache
Copy after login

Done!

The above is the detailed content of centos7 replaces domestic yum source. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:linux公社
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template