Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to mount CD-ROM image ISO file in CentOS system

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

CentOS system how to mount the CD image ISO file, for this problem, this article describes the corresponding analysis and solution in detail, hoping to help more want to solve this problem of small partners to find a simpler and easier way.

1. Mount ISO files

The method to mount ISO files under CentOS is:

First create a folder named iso under/mnt/directory, and then execute the command on the terminal as root:

mount /path to ISO file/*.iso /mnt/iso -t iso9660 -o cadepage=936

Then go to/mnt/iso/directory and double-click autorun to be OK.

Suppose you have three AS3 iso installation files in the fc folder on drive E,

with the following command

The code is as follows:

# mount -o iocharset=cp936 /dev/hda6 /mnt/e

# mount -o loop /mnt/e/fc/rhel-3-i386-as-disc1.iso /mnt/cdrom

You can create a folder under/mnt and hang it to a new folder, such as #mkdir /mnt/iso , not necessarily cdrom

The code is as follows:

# mount -o loop /mnt/e/fc/rhel-3-i386-as-disc2.iso /mnt/iso

Second, modify the yum configuration file and use the local ISO as the yum source.

The code is as follows:

# 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] Configuration:

The code is as follows:

name=CentOS-$releasever - Media

baseurl=file:///mnt/ #indicates that yum source is in/mnt directory, other sources (baseurl) are commented out

#baseurl=file:///media/CentOS/

# file:///media/cdrom/

# file:///media/cdrecorder/

gpgcheck=1

enabled=1 #Enable yum

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Third, clear the cache

The code is as follows:

# yum clean all

# yum list

IV. Testing:

Install Telnet:

The code is as follows:

#yum install telnet*

V. Automatically mount iso image files on boot

In the/etc/fstab table, add the last line to permanently mount the iso file to the system.

The code is as follows:

[root@server ~ ]# cat /etc/fstab

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

/dev/VolGroup00/LogVol01 swap swap defaults 0 0

/mnt/iso/CentOS5.iso /mnt/cdrom iso9660 loop 0 0

About CentOS system how to mount the CD image ISO file questions to share the answer here, I hope the above content can have some help for everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report