Modified article: http://linux.cn/article-1017-1.html
Redhat Yum requires a registration fee to use it, and if not, there are two solutions.
1. Use ISO image to do local Yum source
2. Use CD to make local Yum source
Here the method of using ISO or CD to do local Yum source is similar, but the Linux system will be mounted automatically with the CD-ROM, the ISO image or the need to mount manually, here is the way to mount the ISO.
"One" create local Yum source with local files
1. Create ISO storage directory and mount directory
Mkdir/mnt/iso Mkdir/mnt/cdrom
2. Upload the ISO image file to the/mnt/iso folder
3. Mount the ISO file under/mnt/iso/to the/mnt/cdrom directory
< note: After the mount is done, it will prompt the device to be busy, at which point the umount will need to be unpacked before it can be loaded >
To see if the mount succeeds:
Df-h
< to see all the mounts in the system, mount can also be >
4.< the most critical step > If there are other *.repo files under/etc/yum.repos/, create a folder first, transfer the *.repo to the folder and write your own. Repo file
Then create your own. Repo file
VI Myself.repo
The contents are as follows:
1 [Base]2Name=RedHat3#注: The BaseURL here is the directory you are mounting, here is/mnt/CDROM4Baseurl=file:///Mnt/cdrom5 #注: The value here is enabled must be 16Enabled=17 #gpgckeck的值无所谓8gpgckeck=09#注: This you cd/mnt/cdrom/can see this key, here is just an exampleTengpgkey=file:///Mnt/cdrom/rpm-gpg-key-redhat-beta,file:///Mnt/cdrom/rpm-gpg-key-redhat-release
5. Test:
Yum Clean Allyum Install *c++*
RedHat 6.4 Enterprise Edition uses ISO image to do local Yum source