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