RHEL 7 配置 源

下载EPEL RPM安装包,目前最新的版本是epel-release-7-5.noarch.rpm,如果链接无效,可以在http://dl.fedoraproject.org/pub/epel/7/x86_64/e/找到对应的rpm包即可

下载

1
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

安装

1
yum install epel-release-7-5.noarch.rpm

查看是否安装成功

1
yum repolist

redhat配置centos源

1
vim /etc/yum.repos.d/CentOS-Base.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
[base]

name=CentOS-5-Base

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

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

baseurl=http://ftp.sjtu.edu.cn/centos/7/os/$basearch/

gpgcheck=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7

#released updates

[updates]

name=CentOS-$releasever – Updates

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

baseurl=http://ftp.sjtu.edu.cn/centos/7/updates/$basearch/

gpgcheck=0

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

[extras]

name=CentOS-$releasever – Extras

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

baseurl=http://ftp.sjtu.edu.cn/centos/7/extras/$basearch/

gpgcheck=0

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

[centosplus]

name=CentOS-$releasever – Plus

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

baseurl=http://ftp.sjtu.edu.cn/centos/7/centosplus/$basearch/

gpgcheck=0

enabled=0

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

执行以下命令

1
2
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
rpm -qa gpg-pubkey

地址:http://wuchuiyou.com/2015/05/02/RHEL-7-%E9%85%8D%E7%BD%AECentOS%E6%BA%90/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值