Configure the network yum source and local yum source for RHEL7.2 and RHEL6.5, rhel7.2rhel6.5

Source: Internet
Author: User
Tags aliyun

Configure the network yum source and local yum source for RHEL7.2 and RHEL6.5, rhel7.2rhel6.5

RHEL7.2 configure local yum Source

[Root @ localhost ~] # Monut/dev/sr0/mnt # attach a cd

[Root @ localhost ~] # Rm-rf/etc/yum. repos. d /*

[Root @ localhost ~] # Vim/etc/yum. repos. d/rhel7.repo

[Rhel7-yum] # yum source name, unique, used to distinguish different yum sources

Name = rhel7-source # description of yum Source

Baseurl = file: // mnt # yum Source Path (directory of the repodata directory)

Enabled = 1 # is 1, indicating that the yum source is enabled.

Gpgcheck = 0 # is 1. Use the public key to verify the correctness of rpm.

 

YUM usage:

[Root @ localhost ~] # Yum clean all # Clear yum Cache

[Root @ localhost ~] # Yum list # generate a list

 

RHEL7.2 configure the network yum source configuration

[Root @ localhost ~] # Wget-O/etc/yum. repos. d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

[Root @ localhost ~] # Sed-I's/$ releasever/7/G'/etc/yum. repos. d/CentOS-Base.repo

[Root @ localhost ~] # Yum clean all

[Root @ localhost ~] # Yum list

 

 

RHEL6.5 configure the network yum Source

[Root @ localhost ~] # Monut/dev/sr0/mnt # attach a cd

[Root @ xuegod163 ~] #

Wget-O/etc/yum. repos. d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

[Root @ xuegod163 ~] # Sed-I's/$ releasever/6.7/G'/etc/yum. repos. d/CentOS-Base.repo

[Root @ xuegod163 ~] # Yum clean all

[Root @ xuegod163 ~] # Yum list

 

RHEL6.5 configure local yum Source

[Root @ localhost ~] # Rm-rf/etc/yum. repos. d /*

[Root @ localhost ~] # Vim/etc/yum. repos. d/rhel6.repo

[Rhel6-yum] # yum source name, unique, used to distinguish different yum sources

Name = rhel6-source # description of yum Source

Baseurl = file: // mnt # yum Source Path (directory of the repodata directory)

Enabled = 1 # is 1, indicating that the yum source is enabled.

Gpgcheck = 0

 

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.