CentOS 配置本地yum
2012-10-03 20:56
309 查看
CentOS 配置本地yum
mount /dev/cdrom /media/cdrom/vim /etc/yum.repos.d/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 - Media
baseurl=file:///media/cdrom/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
===================================================================================
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
如果不加上面那一句的话默认走的是网络源不是本地源,会出错!
测试:
yum clean all 清除缓存及旧的包
yum install -y httpd 测试是否能安装软件
相关文章推荐
- CentOS 7.0本地yum源地址及 配置yum地址优先级
- yum 本地仓库配置(CentOS6.4系统)
- Centos7.4配置本地yum源和阿里源并配置yum优先级
- Centos 6.0 本地yum的配置
- Centos6.6 本地 yum 配置
- CentOS下yum本地配置
- CentOS 6.5平台本地YUM配置的方法
- CentOS 7下配置本地yum源及yum客户端
- CentOS 6.6下配置本地yum源与网络yum源
- centos 本地yum配置
- 配置 CentOS 本地 yum
- CentOS 本地yum配置
- centos 6.7 配置 yum 本地源
- Centos配置本地YUM服务器
- CentOS 7 配置yum本地base源和阿里云epel源
- Centos本地yum仓库的配置
- Centos 7.3 基于HTTP配置本地局域网YUM
- centos 配置 YUM 本地源
- Centos 6.5 本地YUM配置
- CentOS 7.0本地yum源地址及 配置yum地址优先级