centos 使用本地yum源设置
2017-02-06 15:50
429 查看
第一步:挂载光盘
[root@localhost ~]# mount /dev/sr0 /mnt
第二步:备份yum源配置
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.BAK
第三步:更改本地yum源配置文件
[root@localhost ~]# vim /etc/yum.repos.d/CentOS-Media.repo
内容改为(红色标记的是修改的)
[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt
# file:///media/cdrom/
# file:///media/cdrecorder/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[root@localhost ~]# mount /dev/sr0 /mnt
第二步:备份yum源配置
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.BAK
第三步:更改本地yum源配置文件
[root@localhost ~]# vim /etc/yum.repos.d/CentOS-Media.repo
内容改为(红色标记的是修改的)
[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt
# file:///media/cdrom/
# file:///media/cdrecorder/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
相关文章推荐
- centos使用光盘作为本地的yum源--转载
- CentOS使用iso镜像文件配置本地yum源
- centos 6.0 修改本地光盘作为yum源 使用更新的国内镜像源
- CentOS6.5使用本地光盘做yum源 (参考:http://www.jb51.net/os/RedHat/43343.html)
- centos6.5本地yum源搭建及使用方法
- centos使用光盘作为本地的yum源
- Centos 6.4使用本地yum源
- centos6.5使用光盘作为本地的yum源
- CentOS6.5使用本地光盘做yum源 (参考:http://www.jb51.net/os/RedHat/43343.html)
- CentOs 5.4设置DVD为本地yum源
- RedHat和CentOS使用本地yum源配置
- RedHat和CentOS使用本地yum源配置
- centos使用光盘作为本地的yum源
- 详解CentOS5.4设置使用rpmforge(packages.sw.be)yum源
- yum -centos本地yum源的使用
- centos6.4搭建基于ftp的yum源让本地局域网服务器使用
- RedHat和CentOS使用本地yum源配置
- redhat 6使用centos设置yum源
- CentOS使用本地光盘做yum源