centos使用光盘作为本地的yum源
来源:互联网 发布:java定义构造函数 编辑:程序博客网 时间:2024/05/22 02:16
在/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]
#
# 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]
觉得自己的光盘的源足够用了。不需要网络源,或者没有网络。
可以使用yum --disablerepo=/* --enablerepo=c5-media [command]
但是使用命令时如果这样
[root@centos yum.repos.d]# yum --enablerepo=c5-media
Loading "installonlyn" plugin
You need to give some command
Loading "installonlyn" plugin
You need to give some command
这不是一个完整的命令,须在后面加上要执行的命令。这部分只是告诉你这条yum命令允许使用本地media介质的源而已。正确的命令如下:
[root@centos cdrom]# yum --disablerepo=* --enablerepo=c5-media update
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
c5-media 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 834 kB 00:00
################################################## 2400/2400
No Packages marked for Update/Obsoletion
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
c5-media 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 834 kB 00:00
################################################## 2400/2400
No Packages marked for Update/Obsoletion
比如安装gdb
[root@centos cdrom]# yum --disablerepo=* --enablerepo=c5-media install gdb
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for gdb to pack into transaction set.
gdb-6.5-25.el5.i386.rpm 100% |=========================| 56 kB 00:00
---> Package gdb.i386 0:6.5-25.el5 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gdb i386 6.5-25.el5 c5-media 3.1 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.1 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: gdb ######################### [1/1]
Installed: gdb.i386 0:6.5-25.el5
Complete!
[root@centos cdrom]#
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for gdb to pack into transaction set.
gdb-6.5-25.el5.i386.rpm 100% |=========================| 56 kB 00:00
---> Package gdb.i386 0:6.5-25.el5 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gdb i386 6.5-25.el5 c5-media 3.1 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.1 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: gdb ######################### [1/1]
Installed: gdb.i386 0:6.5-25.el5
Complete!
[root@centos cdrom]#
- centos使用光盘作为本地的yum源
- centos使用光盘作为本地的yum源
- CentOS使用光盘作为本地的Yum源
- centos使用光盘作为本地的yum源
- 使用rhel5的DVD光盘作为本地yum源
- centos6.5使用光盘作为本地的yum源
- CentOS使用光盘作为本地源
- CentOS使用光盘作为本地源
- CentOS使用本地光盘做yum源
- RHEL YUM 本地光盘作为yum源
- 使用DVD光盘或者ISO作为本地YUM源
- rhel5的DVD光盘作为本地yum源
- CentOS搭建本地光盘YUM源
- 合并 CentOS 6.5 的两个 DVD 作为本地 YUM 源
- 合并 CentOS 6.5 的两个 DVD 作为本地 YUM 源
- centos镜像作为本地源的yum安装
- 使用CentOS光盘镜像作为YUM源安装rpm软件包
- 使用CentOS光盘镜像作为YUM源安装rpm软件包
- 我看德国公司IT部门与国内的差异
- 点石互动--Zac 之:新站点怎样寻找外部链接
- 如何:创建异步 Web 服务方法
- oracle9i10g上面怎样玩*.ora
- 《中国青年报》:宅青,中国闪现闷居一族
- centos使用光盘作为本地的yum源
- Java实现利用搜索引擎收集网址的程序
- Windows socket 代码例子
- Simple traversal of UDP over NATs
- ArcIMS安装过程中存在的问题
- 收集实用功能和经典的javaScript代码(包括部分正则)
- ASP.NET程序中常用的三十三种代码(强荐)! [转]
- 员工试用期合同
- oracle 语句系列