CentOS Local ISO mount and configure local software source

Source: Internet
Author: User
Tags gpg

CentOS mount ISO image file as local source

Operating system: CentOS5.5

ISO file: ISO image for CentOS5.5 one

Operation Steps:

One, mount the ISO file to the mount point
[Email protected] ~]# mount-o loop/mnt/iso/centos5.iso/mnt/cdrom
Two, view mount status
[[email protected] ~ ]# df -hfilesystem             size  used avail use% mounted on/dev/mapper/ volgroup00-logvol00                        19g  3.3g   15g  19% / /dev/sda1              99m    12M   82M  13% /boottmpfs                   62M     0    62M   0% /dev/shm/mnt/iso/CentOS5.iso   3.9G  3.9G      0 100% /mnt/cdrom[[email protected] ~ ]# mount -a
third, modify the Yum configuration file, use the local ISO to do yum source
# cd/etc/yum.repos.d/# MV Centos-base.repo centos-base.repo.bak# CP Centos-media.repo centos-media.repo.bak# Cat CentOS -media.repo[c5-media]name=centos-$releasever-mediabaseurl=file:///mnt/#表明yum源在/mnt Directory, other sources (BaseURL) commented out #baseurl                   =file:///media/centos/# file:///media/cdrom/# file:///media/cdrecorder/gpgcheck=1enabled=1 #启用yum gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5
Four, clear the cache
# yum Clean all# Yum list
Five, test:

To install Telnet:

#yum Install telnet*
six, boot automatically mount ISO image file

In the/etc/fstab table, add the last row to permanently mount the ISO file to the system

[[email protected] ~ ]# cat /etc/fstab/dev/volgroup00/logvol00 /                      ext3    defaults        1 1label=/boot              /boot                ext3    defaults         1 2tmpfs                    /dev/shm              tmpfs   defaults        0  0devpts                   /dev/pts              devpts  gid=5,mode=620   0 0sysfs                    /sys                   sysfs   defaults         0 0proc                     /proc                  proc    defaults         0 0/dev/VolGroup00/LogVol01 swap                  swap    defaults        0 0/mnt/iso/centos5.iso    /mnt/cdrom            Iso9660  loop           0 0

CentOS Local ISO mount and configure local software sources

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.