RHEL6.2 system configuration use local yum source

Source: Internet
Author: User
Tags custom name
1. mount the local CD to the system: Mount the rhel6.2 installation CD to the optical drive, run mkdir/media/rhel in the command line of the terminal. # create the mount/dev/cdrom/media/rhel Directory. # mount the disc to the cd/media/rhel directory in the/media/rhel Directory # go to the Mount directory ls # View The Mount Directory, disk mounting successful 2. configure local yum source c

1. attach the local CD to the system: put the rhel6.2 installation CD into the optical drive and operate it under the command line of the terminal.

Mkdir/media/rhel # Create a Mount Directory
Mount/dev/cdrom/media/rhel # mount the disc to the/media/rhel directory.
Cd/media/rhel # enter the Mount Directory
Ls # check the Mount Directory. the disc is mounted successfully.

2. configure the local yum source
Cd/etc/yum. repos. d/# enter the yum configuration Directory
Touch rhel-media.repo # Create a yum profile
Vi rhel-media.repo # Edit the configuration file and add the following content

[Rhel-media]
Name = Red Hat Enterprise Linux 6.2 # Custom name
Baseurl = file: // media/rhel # local disk Mount path
Enabled = 1 # enable yum source. if 0 is disabled, 1 is enabled.
Gpgcheck = 1 # Check the GPG-KEY, 0 is not checked, 1 is checked
Gpgkey = file: // media/rhel/RPM-GPG-KEY-redhat-release # path to the GPG-KEY


3. clear yum cache and use yum install to automatically install software

Yum clean all # clear yum cache
Yum install php # install php

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.