Configure local yum on Centos7

Source: Internet
Author: User
Install centos7.1 through VMware and first mount the IOS file # mountdev/cdrommnt/cdromdev/cdrom is the iso file directory selected when centos is installed: after creating the mnt/cdrom Directory, run the mountdev/cdrommnt/cdrom command to mount the directory. 2. go to the/etc/yum. repos. d Directory & nbs

Install centos7through VMware.

1. Mount IOS files first

# Mount dev/cdrom mnt/cdromdev/cdrom is the iso file directory selected when centos is installed:

After the mnt/cdrom directory is created, run the mount dev/cdrom mnt/cdrom command to mount it.

2. go to the/etc/yum. repos. d Directory.
# Cd/etc/yum. repos. d
The directory contains the following four files:
The CentOS-Base.repo.bak file is the file I named from, the network yum configured in the base; will be loaded first, won't load the network yum after the name is changed.

3. edit CentOS-Sources.repo files

[Base-source] name = CentOS-$ releasever-Base Sourcesbaseurl = file: // mnt/cdromgpgcheck = 1 enabled = 1 gpgkey = file: /// mnt/cdrom/RPM-GPG-KEY-CentOS-7 # modify baseurl, gpgkey pointing to the Mount Directory, set enabled = 1 indicates enabled.

Now the configuration is complete.

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.