码迷,mamicode.com
首页 > 其他好文 > 详细

RHEL6.6搭建CentOS6.6 yum源

时间:2015-08-25 12:14:34      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:互联网   虚拟机   网上   资料   

现需要在RHEL6.6上安装zabbix2.4,通过虚拟机桥接互联网yum方式安装,但yum –y installnet-snmp zabbix zabbix-server的时候报如下错误,导致安装不上:

技术分享

这个错误是由于没有注册引起的,怎么办呢?网上也查了一些资料,按照网上的资料,现将为自己的环境整理搭建了一下CentOS6.6 yum源!

 

  1. 把原来的yum源卸载掉

# rpm -qa | grep yum | xargs rpm -e –nodeps

 

  1. 添加并安装下载的yumrpm

# rpm -ivhpython-iniparse-0.3.1-2.1.el6.noarch.rpm

# rpm -ivhyum-metadata-parser-1.1.2-16.el6.x86_64.rpm

# rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

[]:最后这两个包必须同时安装,因两个是相互依赖关系。

 

  1. 添加163yum

# cd/etc/yum.repos.d/

# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

 

 

  1. 修改CentOS6-Base-163.repo

#CentOS-Base.repo

#

# The mirrorsystem uses the connecting IP address of the client and the

# update statusof each mirror to pick mirrors that are updated to and

# geographicallyclose to the client.  You should use thisfor CentOS updates

# unless you aremanually picking other mirrors.

#

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

# remarked outbaseurl= line instead.

#

#

 

[base]

name=CentOS-6 - Base- 163.com

baseurl=http://mirrors.163.com/centos/6/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

 

#releasedupdates

[updates]

name=CentOS-6 -Updates - 163.com

baseurl=http://mirrors.163.com/centos/6/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

 

#additionalpackages that may be useful

[extras]

name=CentOS-6 -Extras - 163.com

baseurl=http://mirrors.163.com/centos/6/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

 

#additionalpackages that extend functionality of existing packages

[centosplus]

name=CentOS-6 - Plus- 163.com

baseurl=http://mirrors.163.com/centos/6/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-6 -Contrib - 163.com

baseurl=http://mirrors.163.com/centos/6/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

~

~

~

~

~

~

~

~

~

~

~

  1. # yum clean all    //清理yum缓存

  2. # yum makecache    //将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度

  3. # yum install vim*  //测试yum是否可用

 

    至此,搭建CentOS6.6yum源已成功。


本文出自 “本妞技术” 博客,请务必保留此出处http://dreamerhan.blog.51cto.com/3907965/1687812

RHEL6.6搭建CentOS6.6 yum源

标签:互联网   虚拟机   网上   资料   

原文地址:http://dreamerhan.blog.51cto.com/3907965/1687812

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!