centos6.5 use CD-ROM as a local Yum source

Source: Internet
Author: User

CentOS use CD-ROM as a local Yum source

In fact, every thing has a lot of solutions, do not hang a tree dead
Modify the default source and back up the file before you modify it.
Saw the Netizen use
CentOS uses CD-ROM as a local Yum source reference network http://linux.chinaunix.net/techdoc/desktop/2008/12/04/1050329.shtml
This is too strenuous, the advantage of course is not to modify the default source, this may be the benefit of the CD source.


Looping to create a file directory (this command is for everyone, perhaps know that a one-time nested create a directory of people have, but very practical, particularly recommended)
Mkdir/a/{1,2,3,4,a,b,c,d,cdrom}-P

Mount the optical drive ISO file or partition (the ISO file has been copied to the c6564 folder)

Choose a mount mode according to your situation

[Root@localhost ~]# mount/dev/cdrom/a/cdrom/
[Root@localhost ~]# mount/dev/sdb1/a/cdrom/

Modify the default source and back up the file before you modify it.

[Root@localhost ~]# Cp/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.bak
Or
[Root@localhost ~]# Cat/etc/yum.repos.d/centos-base.repo >/etc/yum.repos.d/centos-base.repo.bak

Edit Yum File
Enabled=1 1 Boot 0 does not start
Gpgcheck=1 1 Detection 0 does not detect

[Root@localhost ~]# Vi/etc/yum.repos.d/centos-base.repo
[Base]
Name=base
baseurl=file:///a/cdrom/c6564
Gpgcheck=1
Enabled=1
Gpgkey=file:///a/cdrom/c6564/rpm-gpg-key-centos-6

Clear cache to create a new cache
[Root@localhost ~]# Yum Clean all (clear cache)
[Root@localhost ~]# Yum Makecache (Create new cache)

2014.02.01< Six >

23:42

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.