centos5.8本地挂载yum源,安装软件包
来源:互联网 发布:中文数据库 编辑:程序博客网 时间:2024/05/01 21:02
首先
[root@mode media]# cd /etc/yum.repos.d/[root@mode yum.repos.d]# lltotal 16-rw-r--r-- 1 root root 560 Dec 19 01:20 CentOS-Media.repodrwxr-xr-x 2 root root 4096 Dec 18 20:03 bakdrwxr-xr-x 2 root root 4096 Jan 28 19:17 ncurses-develdrwxr-xr-x 2 root root 4096 Mar 12 18:32 openssl-devel[root@mode yum.repos.d]# cat CentOS-Media.repo # 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 - Mediabaseurl=file:///mnt/cdrom/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
看到CentOS-Media.repo中的 baseurl=file:///mnt/cdrom/了吗
如果指定了CentOS-meida源,系统会根据路径查找安装 所需要的包
然后创建目录文件,将镜像挂载到那个目录中
、
[root@mode yum.repos.d]# mkdir -p /mnt/cdrom[root@mode yum.repos.d]# mount -o loop /dev/cdrom /mnt/cdrom然后就可以安装需要安装的软件了:
[root@mode yum.repos.d]# yum --disablerepo=\* --enablerepo=c5-media install xinetdLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package xinetd.x86_64 2:2.3.14-16.el5 set to be updated--> Finished Dependency ResolutionDependencies Resolved======================================================================================================================================================================= Package Arch Version Repository Size=======================================================================================================================================================================Installing: xinetd x86_64 2:2.3.14-16.el5 c5-media 127 kTransaction Summary=======================================================================================================================================================================Install 1 Package(s)Upgrade 0 Package(s)Total download size: 127 kIs this ok [y/N]: yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing : xinetd 1/1 Installed: xinetd.x86_64 2:2.3.14-16.el5 Complete![root@mode yum.repos.d]#
2 0
- centos5.8本地挂载yum源,安装软件包
- Centos5.5 本地YUM源
- centos5本地yum源配置
- centos5安装yum源
- Centos5通过安装光盘来创建本地yum源
- Centos5.2 Yum 安装本地光盘软件
- centos5.8 yum源
- Centos5 用光盘作为本地yum源
- centos5.9搭建本地yum源
- Vmware上Centos5.5 安装本地镜像yum
- Centos5配置yum源安装nginx
- 利用安装光盘创建本地 yum 源补装 RPM 软件包
- CentOS用安装光盘创建本地 yum 源补装 RPM 软件包
- 利用安装光盘创建本地 yum 源补装 RPM 软件包
- 利用安装光盘创建本地 yum 源补装 RPM 软件包
- CentOS用安装光盘创建本地 yum 源补装 RPM 软件包
- 安装本地yum源
- centos5.5建本地yum源简易方法
- 梦
- 线性链条件随机场CRF
- 图解HTTPS协议加密解密全过程
- 三种最典型的大数据存储技术路线
- 一个类的实例化对象所占空间的大小
- centos5.8本地挂载yum源,安装软件包
- POJ1995 Raising Modulo Numbers【整数快速幂】
- poj 2065 SETI (高斯消元)
- gcov、lcov与genhtml 使用心得
- What is junction object and how to create it?
- UNIX sigwait函数的用法
- [LeetCode][190][Reverse Bits]
- iOS GCD dispatch_async 多线程
- 网盘存储原理探究