Configuring the local Yum source for Redhat hat in VMware

Source: Internet
Author: User
Tags gpg

Configuring the local Yum source for Redhat hat in VMware

Today we are going to use cm to install the big Data Environment, to need several machines to use the same set of Yum source, so think of copying the redhat image file to the virtual machine, in the suspended use, and finally share to the other virtual machine via HTTP. Then think about it, this is really stupid, first in the virtual machine installation I have hung a mirror, so I just hang up in each virtual machine, directly configure the Yum source can be, do not have to copy the ISO to the virtual machine, reduce disk consumption. So let's talk about how to do it now:

First, the pre-installation check, you need to ensure that your virtual machine has loaded the local mirror, as shown in:

Note: Use the ISO image file to select the location where you want to use the file when you install the system, note that the status check will indicate that you have imported the disc. To see if you have successfully imported the file, you can see if the/media/directory has rhel_6.4 x86_64 Disc 1 files (using Redhat here), and the import is successful.

Second, configure the Yum source

1, using the root user login system, in any directory to create a folder cdrom, the name can be customized, I am in the/mnt folder created under the CDROM folder.

#     Mkdir/mnt/cdrom

2. Execute the following command in any directory:

# Mount-o loop/dev/cdrom/mnt/cdrom/

It should be noted that/dev/cdrom was created when I installed the system, used to hang in the image file, and now hangs on the/mnt/cdrom. If the above command succeeds, you can see that the/mnt/cdrom/directory is identical to the file and/media/rhel_6.4 x86_64 Disc 1/directory, proving that the load was successful.

3, modify the Yum source configuration file, it is recommended to delete all the files in the/etc/yum.repos.d/directory, re-build a. Repo suffix file, the command is as follows:

# cd/etc/yum.repos.d/ # RM-RF * # Touch Yum.repo #

Then copy the following to the Yum.repo file

=red Hat Enterprise Linux 6baseurl=file:///mnt/cdromenable=1gpgkey=1Gpgkey =file:///mnt/cdrom/rpm-gpg-key-redhat-release

Explain the meaning of the configuration a little bit:

[Rhel]
Name =red Hat Enterprise Linux 6#名称随便起
baseurl=file:///mnt/yumsrc/#指定yum源所在文件, the file where the package is located
Enable=1#必须为1, which means enable
Gpgkey=1#表示版本号的检查
Gpgkey=file:///mnt/cdrom/rpm-gpg-key-redhat-release#表明版本号的检查路径

4, the above configuration is complete, the Yum source has been configured, and then you can test the use of commands: Yum install GPM, a return to see Complete! said that has been using Yum source successfully installed GPM, prove the successful installation.

Configuring the local Yum source for Redhat hat in VMware

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.