Modify the CenterOS yum source to be the North Liyuan source

As a representative of advanced productivity, CentOS is a system used by most enterprises that can be upgraded and installed using the yum source, and is posted here as a mirro

1
r image http://mirror.bit.ed

u.cn for on-campus access (

1
2
3
in this regard, a compliment to the network center)

1.

Enter /etc/yum.repos.d/
cd /etc/yum.repos.d/

1
2. Back up all repo files i

n the directory
mv

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[base] CentOS-Base.repo CentOS-Base.repo.bak
Other documents are the same

3. Create a new CentOS-Base.repo
yum CentOS-Base.repo
Then stick the following code

name-centOS-$releasever-Base
baseurl-http://mirror.bit.edu.cn/centos/$rel[updates]easever/os/$basearch/
gpgcheck is 1
gpgkey-file://etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

name-CentOS-$releasever - Updates
baseurl-http://mirror.bit.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck is 1
gpgkey-file://etc/pki/rpm-gpg/R[extras]PM-GPG-KEY-CentOS-6

name-centOS-$releasever-extras
baseurl-http://mirror.bit.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck is 1
gpgkey-file://etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

:wq save exit

4. Clear the yum cache and upda

te the cache for the source to take effect i

1
2
3
mmediately
yum clean all
yum makecache

共有 0 条评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.