久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

centos使用光盤作為本地的yum源

 MikeDoc 2012-11-08
轉自:http://qubaoquan.blog.51cto.com/1246748/292516

建立文件夾

[root@localhost CentOS]# mkdir /media/CentOS

把光盤加載到本地

[root@localhost CentOS]# mount /dev/cdrom /media/CentOS

在/etc/yum.repos.d/目錄下,,有兩個文件

CentOS-Base.repo和CentOS-Media.repo

其中CentOS-Base.repo記錄著網絡上的yum源的地址和路徑信息等

CentOS-Media.repo記錄著可以從本地作為yum源的介質和路徑,。其中還有這樣一個說明:

# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
# CentOS-5. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c5-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c5-media [command]

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/ CentOS
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta

我們只需編輯下bashurl ,,將自己的光盤路徑寫入就可以了。

clip_image002覺得自己的光盤的源足夠用了,。不需要網絡源,,或者沒有網絡。

可以使用yum --disablerepo=\* --enablerepo=c5-media [command]

yum命令允許使用本地media介質的源而已,。正確的命令如下(更新gcc為例):

clip_image001 [root@centos cdrom]# yum --disablerepo =* --enablerepo=c5-media install gcc

clip_image001[1] clip_image002[1]Loading " installonlyn " plugin
clip_image002[2]Setting up Update Process
clip_image002[3]Setting up repositories
clip_image002[4]c5 - media                   100 % |=========================| 1.1 kB     00 : 00
clip_image002[5]Reading repository metadata in from local files
clip_image002[6]primary.xml.gz             100 % |=========================| 834 kB     00 : 00
clip_image002[7]################################################## 2400 / 2400
clip_image002[8]No Packages marked for Update / Obsoletion
clip_image002[9]

比如安裝gdb

clip_image002[10][root@centos cdrom]# yum --disablerepo =* --enablerepo=c5-media install gdb
clip_image002[11]Loading " installonlyn " plugin
clip_image002[12]Setting up Install Process
clip_image002[13]Setting up repositories
clip_image002[14]Reading repository metadata in from local files
clip_image002[15]Parsing package install arguments
clip_image002[16]Resolving Dependencies
clip_image002[17]--> Populating transaction set with selected packages. Please wait.
clip_image002[18]---> Downloading header for gdb to pack into transaction set .
clip_image002[19]gdb - 6.5 - 25 .el5.i386.rpm    100 % |=========================| 56 kB     00 : 00
clip_image002[20]---> Package gdb.i386 0 : 6.5 - 25 .el5 set to be updated
clip_image002[21]--> Running transaction check
clip_image002[22]
clip_image002[23]Dependencies Resolved
clip_image002[24]
clip_image002[25]=============================================================================
clip_image002[26]Package                  Arch        Version           Repository         Size
clip_image002[27]=============================================================================
clip_image002[28]Installing:
clip_image002[29]gdb                      i386        6.5 - 25 .el5        c5 - media           3.1 M
clip_image002[30]
clip_image002[31]Transaction Summary
clip_image002[32]=============================================================================
clip_image002[33]Install       1 Package(s)         
clip_image002[34]Update        0 Package(s)         
clip_image002[35]Remove        0 Package(s)         
clip_image002[36]
clip_image002[37]Total download size: 3.1 M
clip_image002[38]Is this ok [y / N]: y
clip_image002[39]Downloading Packages:
clip_image002[40]Running Transaction Test
clip_image002[41]Finished Transaction Test
clip_image002[42]Transaction Test Succeeded
clip_image002[43]Running Transaction
clip_image002[44]   Installing: gdb                           ######################### [ 1 / 1 ]
clip_image002[45]
clip_image002[46]Installed: gdb.i386 0 : 6.5 - 25 .el5
clip_image002[47]Complete !
clip_image002[48][root@centos cdrom]#
clip_image002[49]

在使用yum進行install時,,經常會出現(xiàn)下面的錯誤
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
導致安裝不能進行,。解決方法如下:
[root@localhost CentOS]# rpm --import   /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[root@localhost CentOS]# rpm --import   /etc/pki/rpm-gpg/RPM-GPG-KEY-beta


    本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點,。請注意甄別內容中的聯(lián)系方式,、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多