Today I picked up Redhat again for the RHCE exam is coming soon.
After installing the basic system, meet problem, I need to do some DNS practice. But I don't like install the rpm package from DVD, I just want to yum it from the ISO source. So in order to make a good practice environment. I did the following steps:
1. mount the ISO file first and make it startup by system every time.
[iyunv@redhat ~]# mkdir /mnt/win # I want to mount windows partition to win folder
[iyunv@redhat ~]# mkdir /mnt/iso # I want to mount RHEL5 ISO to iso folder
[iyunv@redhat ~]# chmode -R 777 /mnt/win /mnt/iso # make sure there's enough privilage to access these two folders
[iyunv@redhat ~]# fdisk -l # Display all the partition
From the /etc/fstab, add this line:
/dev/hda1 /mnt/win ntfs umask=000 0 0 # This means to mount the NTFS partition when system startup
in /etc/rc.d/rc.local, add this line:
mount -o loop /mnt/win/ISO/rhel-5-server-i386-dvd.iso /mnt/iso # This means to mount ISO file to /mnt/iso folder when system startup
[iyunv@redhat ~]# mount -a
[iyunv@redhat ~]# /etc/rc.local # These two lines means to mount NTFS partition to /mnt/win first, then mount ISO file to /mnt/iso
[Server]
name=Red Hat Enterprise Linux ISO image
baseurl=file:///mnt/iso/Server/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release