rhel6.x 利用centos yum源
来源:互联网 发布:电视怎么切换网络电视 编辑:程序博客网 时间:2024/05/18 22:12
前期工作
rpm --import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
rpm --import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
安装那个163的GPG,也可增加其他资源库,自己选择一个离自己地理位置近点
rpm -qa gpg-pubkey*
检查GPG Key
gpg-pubkey-c105b9de-4e0fd3a3
如果要删除Key,使用以下命令:
rhel6.2 X86_64 系统
第一步,修改 /etc/yum.repos.d/ *.repo 文件,我这里是rhel-source.repo。
rhel-source.repo内容为
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch -Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch -Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
第二步,打开对应的centos版本163源 的repo文件,这里 Red Hat Enterprise Linux 6.2对应CentOS6。下载弟子为http://mirrors.163.com/.help/CentOS6-Base-163.repo将这个文件内容全部复制,粘贴在rhel-source.repo后面(不要覆盖原来的内容)
并将“name=CentOS- “全部替换为“name=Red Hat Enterprise Linux"
将“- 163.com”全部替换为“ ”
保存rhel-source.repo文件
第三步,ll
[root@aivyoyo ~]#yum cleanall 清除缓存及旧的包
[root@aivyoyo ~]# yum installhttpd 测试是否能更新软件
附上CentOS-Base.repo文件的内容,懒得下的,而且版本对的,可以直接复制
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the clientand the
# update status of each mirror to pick mirrors that are updated toand
# geographically close to the client.
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you cantry the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existingpackages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
参考:http://viong.blog.51cto.com/844766/278402
- rhel6.x 利用centos yum源
- rhel5.x&rhel6.x更换CentOS yum源
- RHEL6 yum更改为CentOS源
- 配置RHEL6使用CentOS的yum源
- RHEL6.5使用CENTOS的YUM源
- RHEL6.3 YUM 换网易CentOS源
- RHEL6设置CentOS的yum源
- RHEL6.2配置Centos YUM源及第三方源方法
- RHEL6.2(X86_64)使用CentOS YUM源更新
- RHEL6.5使用CENTOS的YUM源 分…
- RHEL6/Centos 解决无法使用YUM源问题
- RHEL6制作yum源
- rhel6 配置yum源
- RHEL6更换yum源
- RHEL6配置yum源
- RHEL6配置yum源
- RHEL7.x的ISO yum源配置(与rhel5.x和rhel6.x不太一样)
- RHEL6.4安装CentOS的yum
- 第十六周上机项目一:统计字符串中(大/小写)字母个数
- ubuntu下安装tftp服务
- [原创]opencv学习之eclipse平台编…
- [转]Apache 虚拟主机 VirtualHost
- 无光驱情况下,U盘启动安装CentOS nbsp;…
- rhel6.x 利用centos yum源
- 在centos编译gcc4.7[转]
- 给centos 6.2安装yum源
- Linux环境变量配置总结
- Oracle存储过程,带游标
- 手机内支持分享的应用 手机端已安装的apk文件 有什么分别呢
- windows 下 查看端口使用情况
- 【Shell】shell中执行一个字符串定义的语句
- flex连接sql数据库