centos用ISO光盘镜像搭建本地yum源
2014-11-04 11:42
239 查看
setup local repo for yum with DVD.iso file in CentOS system
+---------------------------------+
| for centos 6.6 |
+---------------------------------+
1. mount the DVD iso file
# mkdir /media/_local_repo_DVD1
# mount -o loop -t iso9660 CentOS-6.6-i386-bin-DVD1.iso /media/_local_repo_DVD1
2. backup the original repo files in /etc/yum.repos.d/
# mv CentOS-Base.repo CentOS-Base.repo.backup
use this method to backup all other repo files;
3. edit the empty file /etc/yum.repos.d/_local_DVD.repo
# vim /etc/yum.repos.d/_local_DVD.repo
-------------------------------------------------------
[_local_DVD_repo]
name=This is a local repo.
baseurl=file:///media/_local_repo_DVD1
# file:///media/_local_repo_DVD2
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=30
-------------------------------------------------------
4. refresh the cache for yum
# yum clean all
# yum makecache
when you install the software and warning you
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6"
please use
# rpmkeys --import
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
+---------------------------------+
| for centos 7.0-1406 |
+---------------------------------+
1. mount the DVD iso file
# mkdir /media/_local_repo_DVD1
# mount -o loop -t iso9660 CentOS-7.0-1406-x86_64-bin-DVD.iso /media/_local_repo_DVD
2. backup the original repo files in /etc/yum.repos.d/
# mv CentOS-Base.repo CentOS-Base.repo.backup
use this method to backup all other repo files;
3. edit the empty file /etc/yum.repos.d/_local_DVD.repo
# vim /etc/yum.repos.d/_local_DVD.repo
-------------------------------------------------------
[_local_DVD_repo]
name=This is a local repo.
baseurl=file:///media/_local_repo_DVD
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=30
-------------------------------------------------------
4. refresh the cache for yum
# yum clean all
# yum makecache
when you install the software and warning you
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7"
please use
# rpmkeys --import
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+---------------------------------+
| for centos 6.6 |
+---------------------------------+
1. mount the DVD iso file
# mkdir /media/_local_repo_DVD1
# mount -o loop -t iso9660 CentOS-6.6-i386-bin-DVD1.iso /media/_local_repo_DVD1
2. backup the original repo files in /etc/yum.repos.d/
# mv CentOS-Base.repo CentOS-Base.repo.backup
use this method to backup all other repo files;
3. edit the empty file /etc/yum.repos.d/_local_DVD.repo
# vim /etc/yum.repos.d/_local_DVD.repo
-------------------------------------------------------
[_local_DVD_repo]
name=This is a local repo.
baseurl=file:///media/_local_repo_DVD1
# file:///media/_local_repo_DVD2
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=30
-------------------------------------------------------
4. refresh the cache for yum
# yum clean all
# yum makecache
when you install the software and warning you
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6"
please use
# rpmkeys --import
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
+---------------------------------+
| for centos 7.0-1406 |
+---------------------------------+
1. mount the DVD iso file
# mkdir /media/_local_repo_DVD1
# mount -o loop -t iso9660 CentOS-7.0-1406-x86_64-bin-DVD.iso /media/_local_repo_DVD
2. backup the original repo files in /etc/yum.repos.d/
# mv CentOS-Base.repo CentOS-Base.repo.backup
use this method to backup all other repo files;
3. edit the empty file /etc/yum.repos.d/_local_DVD.repo
# vim /etc/yum.repos.d/_local_DVD.repo
-------------------------------------------------------
[_local_DVD_repo]
name=This is a local repo.
baseurl=file:///media/_local_repo_DVD
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=30
-------------------------------------------------------
4. refresh the cache for yum
# yum clean all
# yum makecache
when you install the software and warning you
GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7"
please use
# rpmkeys --import
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
相关文章推荐
- 【RedHat/Centos】利用iso镜像做本地yum源 转
- CentOS搭建本地光盘YUM源
- RedHat/Centos利用iso镜像做本地yum源
- 将光盘镜像CentOS-5.3-i386-bin-DVD.iso设置成为yum源
- CentOS6.5环境下使用镜像文件搭建本地yum源
- CentOS 本地iso挂载并配置iso镜像作为yum源安装软件
- CentOS利用iso镜像做本地yum源-make等命令无权限解决
- RedHat/CentOS利用iso镜像做本地yum源
- RedHat/CentOS利用iso镜像做本地yum源
- RedHat/CentOS利用iso镜像做本地yum源
- CentOS使用ISO镜像做本地YUM源
- centos 6.0 修改本地光盘作为yum源 使用更新的国内镜像源
- RedHat/CentOS利用iso镜像做本地yum源
- 【RedHat/Centos】利用iso镜像做本地yum源 转
- 【RedHat/Centos】利用iso镜像做本地yum源
- 【RedHat/Centos】利用iso镜像做本地yum源
- RedHat/CentOS利用iso镜像做本地yum源
- RHEL6通过安装光盘或ISO文件制作本地yum源的方法
- RedHat企业版6.0 通过安装光盘或ISO文件制作本地yum源
- CentOS本地YUM源搭建