189 8069 5689

rhel5.6怎么配置使用centos源和本地源

本篇内容介绍了“rhel5.6怎么配置使用centos源和本地源”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

我们提供的服务有:成都做网站、成都网站建设、微信公众号开发、网站优化、网站认证、云阳ssl等。为上千余家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的云阳网站制作公司

[root@test125 etc]# rpm -ivh ftp://ftp.cs.stanford.edu/pub/rpms/centos/5/i386/rpmforge-release-0.3.6-

1.el5.rf.i386.rpm
Retrieving ftp://ftp.cs.stanford.edu/pub/rpms/centos/5/i386/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
warning: /var/tmp/rpm-xfer.FQ5d7M: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]
[root@test125 etc]# mv /etc/yum.repos.d/rhel-debuginfo.repo  /etc/yum.repos.d/rhel-debuginfo.repo.bak
[root@test125 etc]# mv /etc/yum.repos.d/rpmforge.repo   /etc/yum.repos.d/rpmforge.repo.bak

[root@test125 etc]# cd yum.repos.d/
[root@test125 yum.repos.d]# touch rhel-debuginfo.repo
[root@test125 yum.repos.d]# touch mirrors-rpmforge
[root@test125 yum.repos.d]# touch rpmforge.repo
[root@test125 yum.repos.d]# vi rhel-debuginfo.repo
[root@test125 yum.repos.d]# vi mirrors-rpmforge
[root@test125 yum.repos.d]# vi rpmforge.repo
#这三个文件见附件(可下载)
[root@test125 yum.repos.d]# yum install yum-fastestmirror yum-presto
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
addons                                                   |  951 B     00:00    
addons/primary                                           |  204 B     00:00    
base                                                     | 1.1 kB     00:00    
base/primary                                             | 1.2 MB     00:40    
base                                                                  3566/3566
dag                                                      | 1.1 kB     00:00    
dag/primary                                              | 3.9 MB     02:43    
dag                                                                 10900/10900
extras                                                   | 2.1 kB     00:00    
extras/primary_db                                        | 176 kB     00:05    
rpmforge                                                 | 1.1 kB     00:00    
rpmforge/primary                                         | 3.9 MB     06:19    
rpmforge                                                            10900/10900
update                                                   | 1.9 kB     00:00   
update/primary_db                                        | 453 kB     00:09    
Setting up Install Process
No package yum-presto available.
Resolving Dependencies
--> Running transaction check
---> Package yum-fastestmirror.noarch 0:1.1.16-16.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch        Version                     Repository
                                                                           Size
================================================================================
Installing:
 yum-fastestmirror      noarch      1.1.16-16.el5.centos        base       19 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 19 k
Is this ok [y/N]: y
Downloading Packages:
yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm        |  19 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : yum-fastestmirror                                        1/1

Installed:
  yum-fastestmirror.noarch 0:1.1.16-16.el5.centos                              

Complete!
You have new mail in /var/spool/mail/root

试验一下:
[root@test125 yum.repos.d]# yum install ipvsadm     (安装LVS集群套件)
Loaded plugins: fastestmirror, rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Loading mirror speeds from cached hostfile
 * rpmforge: apt.sw.be
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ipvsadm.x86_64 0:1.24-13.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch             Version                Repository      Size
================================================================================
Installing:
 ipvsadm           x86_64           1.24-13.el5            base            34 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 34 k
Is this ok [y/N]: y
Downloading Packages:
ipvsadm-1.24-13.el5.x86_64.rpm                           |  34 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : ipvsadm                                                  1/1

Installed:
  ipvsadm.x86_64 0:1.24-13.el5                                                 

Complete!
[root@test125 yum.repos.d]#

使用本地源的配置过程:

1.首先挂载光盘,光盘自运行一般挂到/media下。

请在/mnt下新建文件夹/cdrom

然后挂载dvd安装盘到/mnt/cdrom 

2.检查系统中是否已经安装了如下软件包(版本号可能有所不同),如果缺少,请自行安装。

# rpm -qa |grep yum

yum-3.2.19-18.el5

yum-security-1.1.16-13.el5

yum-updatesd-0.9-2.el5

yum-rhn-plugin-0.5.3-30.el5

yum-metadata-parser-1.1.2-2.el5 

3.编辑/etc/yum.repos.d/rhel-debuginfo.repo,添加如下内容

[base]

name=Server Local Sources

baseurl=file:///mnt/cdrom/Server

enable=1

gpcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

如果您打算基于此安装cluster、clusterstorage或者xen相关的软件包,只须再添加以下内容:

[VT]

name=VT Local Sources

baseurl=file:///mnt/cdrom/VT

enable=1

gpcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

[Cluster]

name=Cluster Local Sources

baseurl=file:///mnt/cdrom/Cluster

enable=1

gpcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

[ClusterStorage]

name=ClusterStorage Local Sources

baseurl=file:///mnt/cdrom/ClusterStorage

enable=1

gpcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

当然,以上三段内容均可以单独结合[base]段使用,例如,如果您只需要安装Xen相关rpm包,您只需要添加[VT]段结合[base]段即可。

4.测试。

#rpm --import /mnt/cdrom/RPM-GPG-KEY-redhat-release 

#yum clean   all

#yum install iptraf

#yum install ipvsadm 如果能安装就成功了

“rhel5.6怎么配置使用centos源和本地源”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!


当前名称:rhel5.6怎么配置使用centos源和本地源
链接地址:http://jkwzsj.com/article/ihioih.html

其他资讯