Yum 安装:

[root@localhost ~]# cd/etc/yum.repos.d/              //yum仓库包配置文件默认的存放位置,里面的文件我们可以删除了重新创建 .repo 后缀的文件

 

[root@localhost yum.repos.d]# vim rhel6.repo          //新建一个,名字可以任意,但是后缀名必须是 .repo 的文件,在里面添加我们的软件包位置

 

[Server]                     //仓库ID,可以自定义。常规软件包,如mysql,httpd,开发工具,系统管理工具等

name=Server            //仓库名,可以自定义

baseurl=ftp://172.16.1.253/rhel6.4/Server    //这个添加的时server软件包位置,一般添加Server位置后就能满足我们的日常工作了,后面的其他仓库文件可以不用添加,我这里把所有的仓库文件都添加了。//我这边添加的是ftp服务器上面的yum仓库,本地光盘添加需要找到光盘挂载路径,如baseurl=file:///media/"OL6.4 x86_64 Disc 1 20130225"/Server                   

enabled=1                   //是否启用该仓库,1开启

gpgcheck=0                 //是否检查软件包的签名,0不开启

 

 

 

[LoadBalancer]                         //负载均衡,如lvs,pirihan

name=LoadBalancer

baseurl=ftp://172.16.1.253/rhel6.4/LoadBalancer

enabled=1

gpgcheck=0

 

[HighAvailability]                       //高可用

name=HighAvailability

baseurl=ftp://172.16.1.253/rhel6.4/HighAvailability

enabled=1

gpgcheck=0

 

[ResilientStorage]                //存储

name=ResilientStorage

baseurl=ftp://172.16.1.253/rhel6.4/ResilientStorage

enabled=1

gpgcheck=0

 

[ScalableFileSystem]           //系统扩展

name=ScalableFileSystem

baseurl=ftp://172.16.1.253/rhel6.4/ScalableFileSystem

enabled=1

gpgcheck=0

~                                                                                                                           

~                                                                                                                           

~

配置完后,保存退出。

 

[root@localhost yum.repos.d]# yum repolistall          //查看是否配置好yum

Loaded plugins: product-id,refresh-packagekit, security, subscription-manager

This system is not registered to Red HatSubscription Management. You can use subscription-manager to register.

repo id                                               repo name                                              status

HighAvailability                                       HighAvailability                                       enabled:    56

LoadBalancer                                          LoadBalancer                                           enabled:     4

ResilientStorage                                      ResilientStorage                                       enabled:    62

ScalableFileSystem                                    ScalableFileSystem                                     enabled:     7

Server                                                Server                                                  enabled:3,648

repolist: 3,777