溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

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

發(fā)布時間:2021-07-22 09:56:40 來源:億速云 閱讀:193 作者:chen 欄目:云計(jì)算

本篇內(nèi)容介紹了“rhel5.6怎么配置使用centos源和本地源”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

[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

試驗(yàn)一下:
[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.首先掛載光盤,光盤自運(yùn)行一般掛到/media下。

請?jiān)?mnt下新建文件夾/cdrom

然后掛載dvd安裝盤到/mnt/cdrom 

2.檢查系統(tǒng)中是否已經(jīng)安裝了如下軟件包(版本號可能有所不同),如果缺少,請自行安裝。

# 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,添加如下內(nèi)容

[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相關(guān)的軟件包,只須再添加以下內(nèi)容:

[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

當(dāng)然,以上三段內(nèi)容均可以單獨(dú)結(jié)合[base]段使用,例如,如果您只需要安裝Xen相關(guān)rpm包,您只需要添加[VT]段結(jié)合[base]段即可。

4.測試。

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

#yum clean   all

#yum install iptraf

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

“rhel5.6怎么配置使用centos源和本地源”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI