Local Yum source using CentOS DVD1 and DVD2

Source: Internet
Author: User
Tags gpg

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.