redhat  5.5 配置网络yum源


以下为配置文件/etc/yum.repos.d/rhel-media.repo


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

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64



​# The mirror system uses the connecting IP address ​​​​of​​​ ​​the client ​​​​and​​​ ​​the  ​

​# ​​​​update​​​ ​​status ​​​​of​​​ ​​each mirror ​​​​to​​​ ​​pick mirrors that are updated ​​​​to​​​ ​​and​​  

​# geographically ​​​​close​​​ ​​to​​​ ​​the client.  You should use this ​​​​for​​​ ​​CentOS updates  ​

​# unless you are manually picking other mirrors.  ​

​#  ​

​# If the mirrorlist= does ​​​​not​​​ ​​work​​​ ​​for​​​ ​​you, ​​​​as​​​ ​​a fall back you can try the   ​

​# remarked ​​​​out​​​ ​​baseurl= line ​​​​instead​​​​.  ​

​#  ​

​#  ​



​[base]  ​

​name​​​​=CentOS-5 - Base  ​

​#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os  ​

​#baseurl=http://mirror.centos.org/centos/5/os/$basearch/  ​

​baseurl=http://vault.centos.org/5.11/os/$basearch/  ​

​gpgcheck=1  ​

​gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-​​​​KEY​​​​-CentOS-5  ​



​#released updates   ​

​[updates]  ​

​name​​​​=CentOS-5 - Updates  ​

​#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates  ​

​#baseurl=http://mirror.centos.org/centos/5/updates/$basearch/  ​

​baseurl=http://vault.centos.org/5.11/updates/$basearch/  ​

​gpgcheck=1  ​

​gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-​​​​KEY​​​​-CentOS-5  ​



​#additional packages that may be useful  ​

​[extras]  ​

​name​​​​=CentOS-5 - Extras  ​

​#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=extras  ​

​#baseurl=http://mirror.centos.org/centos/5/extras/$basearch/  ​

​baseurl=http://vault.centos.org/5.11/extras/$basearch/  ​

​gpgcheck=1  ​

​gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-​​​​KEY​​​​-CentOS-5  ​





​#additional packages that extend functionality ​​​​of​​​ ​​existing packages  ​

​[centosplus]  ​

​name​​​​=CentOS-5 - Plus  ​

​#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus  ​

​#baseurl=http://mirror.centos.org/centos/5/centosplus/$basearch/  ​

​baseurl=http://vault.centos.org/5.11/centosplus/$basearch/  ​

​gpgcheck=1  ​

​enabled=0  ​

​gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-​​​​KEY​​​​-CentOS-5  ​





​#contrib - packages ​​​​by​​​ ​​Centos Users  ​

​[contrib]  ​

​name​​​​=CentOS-5 - Contrib  ​

​#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=contrib  ​

​#baseurl=http://mirror.centos.org/centos/5/contrib/$basearch/  ​

​baseurl=http://vault.centos.org/5.11/contrib/$basearch/  ​

​gpgcheck=1  ​

​enabled=0  ​

​gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-​​​​KEY​​​​-CentOS-5</span></strong></span>​



更新yum源:

yum clean all 

yum makecache


若makecache报错,导入新的GPG-KEY再执行一次即可搞定

rpm --import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5





About Me


........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文pdf版、个人简介及小麦苗云盘地址: ​​http://blog.itpub.net/26736162/viewspace-1624453/​

● 数据库笔试面试题库及解答: ​​http://blog.itpub.net/26736162/viewspace-2134706/​

● DBA宝典今日头条号地址: ​​http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826​

........................................................................................................................

● QQ群号: 230161599 、618766405

● 于 2019-08-01 06:00 ~ 2019-08-31 24:00 在西安完成

● 最新修改时间:2019-08-01 06:00 ~ 2019-08-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

........................................................................................................................

使用 微 信客户端扫描下面的二维码来关注小麦苗的微 信公众号( ​​xiaomaimiaolhr​​)及QQ群(DBA宝典)、添加小麦苗微 信, 学习最实用的数据库技术。


........................................................................................................................