RHCE certification Tutorial: Configure yum source in RHEL6

Source: Internet
Author: User
Tags custom name
To build a YUM source, first mount the disc to the/mnt directory # mount/dev/cdrom/mnt to completely copy the content from the disc to/var/ftp/pub # cp-rf/ mnt/*/var/ftp/pub enter the default ftp directory # cd/var/ftp/pub # rm-rf *. html [delete all html files] After deleting all html files, such as # yumu

Build YUM source end

First, attach the disc to the/mnt directory.

# Mount/dev/cdrom/mnt

Copy the content on the CD to/var/ftp/pub.

# Cp-rf/mnt/*/var/ftp/pub

Go to the default ftp directory # cd/var/ftp/pub

# Rm-rf *. html [delete all html files]

After deleting all html files, as shown in figure

# Yum update [upgrade the local repo source]

Configure YUM client

Because the *. repo file of the client is no longer provided in RHEL6, We need to manually create the repo File

# Vim/etc/yum. repo/server1.repo [the tentative file name here is server1.repo]

The required editing content is as follows:

[Test]-yum source name, custom name

Name = test-specifies the name of the yum source, which must be consistent with the content in [test ].

Baseurl = ftp: // 172.16.8.2/pub/-- path of the yum Source

For the local source, baseurl = file: // mnt/

Enabled = 1-1 indicates that if the yum source is started, 0 indicates that the yum source is not enabled.

Gpgcheck = 0-0 indicates that the rpm package verification is not performed.

# Yum clean all [clear the cache of the local yum source]

# Yum list [create a local list of yum 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.