配置RedHat使用163的yum源

配置redhat 使用163 or sohu 的yum 源 

1.#cp /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.bk 首先备份下redhat yum  的配置样例文件。

2.#wget http://mirrors.163.com/.help/CentOS-Base-163.repo 或者 #wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo 下载163或sohu提供的yum 配置文件

3.#vi CentOS-Base-163.repo 替换$releaserver 为5或者6[5/6为centos的版本] 

4.#yum makecache  第3部不修改则第4部会出现如下错误:“[root@localhost ~]# yum makecache
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
http://mirrors.163.com/centos/5Server/addons/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again”

5.#cd /etc/pki/rpm-gpg #wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#yum update 错误信息:warning:rpmts_hdrfromfdno:header v3 dsa signature:nokey,key id e823568 GPG key retrieval:[errno 5] oserror:[errno 2] no such file or directory:'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5'

原因:localhost不存在指定的文件/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

6.#yum install yum-fastestmirror 安装fastestmirror插件可自动选择最快的yum 源

7.#yum install -y yumex 安装图形化界面的yum

yum 常用的命令 #yum install -y xxx   安装xxx软件 #yum info xxx           查看xxx软件的基本信息 #yum remove/erase xxx 卸载xxx软件 


转载于:https://my.oschina.net/aiguozhe/blog/189319

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值