虚拟化容器,大数据,DBA,中间件,监控。

redhat6.5/RHEL6 配置使用centos的yum源

02 05月
作者:admin|分类:系统运维
  1. 把原来的yum源卸载掉

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

 

  1. 添加并安装下载的yumrpm

      wget http://mirrors.163.com/centos/6.8/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm


# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm

 # rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm

# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

# rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-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是否可用


浏览1852 评论0
返回
目录
返回
首页
centos 7 x64 Rsync+sersync数据实时同步 Centos 6/7 yum安装oracle官方mysql5.6/5.7