CentOS6 above will generally provide a DVD1 and a DVD2 image, using DVD1 can be installed using CentOS, DVD2 storage of some additional packages, this article describes how to create and use the local Yum warehouse
Two DVD images combined with CentOS 6
1. Related catalogue:
/MNT/DVD1 and/MNT/DVD2 for mounting Centos mirrors
/MNT/DVD3 the merged image file
/mnt/iso ISO Storage
Mkdir-p/mnt/dvd1/mnt/dvd2/mnt/dvd3/mnt/iso
2. Upload the CentOS image to the server and mount the CentOS image file.
Mount-o LOOP/MNT/ISO/CENTOS-6.5-X86_64-BIN-DVD1.ISO/MNT/DVD1
Mount-o LOOP/MNT/ISO/CENTOS-6.5-X86_64-BIN-DVD2.ISO/MNT/DVD2
3. Copy files
First, copy all the files from the first DVD to the/MNT/DVD3 directory, and then copy all the rpm files from the Packages directory in the second DVD to the/mnt/dvd3/packages directory.
Cp-av/mnt/dvd1/mnt/dvd3
Cp-v/mnt/dvd2/packages/*.rpm/mnt/dvd3/packages/
4. Merging TRANS.TBL
Append the TRANS.TBL information in the DVD2 to the DVD1 trans.tbl, and sort save
Cat/mnt/dvd2/packages/trans. TBL >>/mnt/dvd3/packages/trans. TBL
Mv/mnt/dvd3/packages/{trans. Tbl,trans. TBL. BAK}
Sort/mnt/dvd3/packages/trans. TBL. BAK >/mnt/dvd3/packages/trans. TBL
Rm-rf/mnt/dvd3/packages/trans. TBL. Bak
DVD3 is already a merged file and can be used as a local source and as an ISO.
5. Back up the Yum configuration file
Cd/etc/yum.repos.d
Rename. Repo. Repo.bak *.repo
6. Generate a new Yum configuration file
Vi/etc/yum.repos.d/centos-media.repo
[C6-media]
Name=centos-\ $releasever-media
Baseurl=file:///mnt/dvd3
Gpgcheck=0
Enabled=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6
7. Update the Yum source
Yum Clean All
Yum Upgrade
This article is from the "Mr.zhu-Technology Exchange" blog, please be sure to keep this source http://bjishu.blog.51cto.com/7481301/1694758
Local Yum source using CentOS DVD1 and DVD2