Before the experiment: Prepare two virtual machines, using bridge, same network segment, refer to the following
respectively: 192.168.1.166
192.168.1.177
1 Configure the server side of the Yum source to give a historical record
[Email protected] ~]# mount/dev/cdcrom/mnt
Wuyi [[email protected] ~]# mount/dev/cdcrom/mnt
Ls/mnt
Vi/etc/yum.repos.d/rhel-source.repo This step can be skipped
[Server]
Name=server
Baseurl=file:///mnt
Enabled=1
Gpgcheck=0
The Yum install vim
Yum Install Vsftpd-y
Iptables-f
Service Iptables Stop
cp-rvf/mnt/var/ftp/pub/
Yum Install createrepo-v/var/ftp/pub
ls/var/ftp/pub/
ls/var/ftp/pub/mnt/
Service VSFTPD Restart
On other service services side
Configuration ~]# Vim/etc/yum.repos.d/local.repo Take care of the local name.
[Server]
Name=server
Baseurl=ftp://192.168.1.166/pub/mnt
Enabled=1
Gpgcheck=0
[Highavailability]
Name=highavailability
Baseurl=ftp://192.168.1.166/pub/mnt
Enabled=1
Gpgcheck=0
[LoadBalancer]
Name=loadbalancer
Baseurl=ftp://192.168.1.166/pub/mnt
Enabled=1
Gpgcheck=0
[Resilientstorage]
Name=resilientstorage
Baseurl=ftp://192.168.1.166/pub/mnt
Enabled=1
Gpgcheck=0
[Scalablefilesystem]
Name=scalablefilesystem
Baseurl=ftp://192.168.1.166/pub/mnt
Enabled=1
Gpgcheck=0
~
Finish saving
Pay attention to configure the firewall, do not understand the words directly; ~]# iptables-f
~]# Yum Clean All
~]# Yum list to see if it was successful
This article from the "Double Knife" blog, reproduced please contact the author!
Configuring the Yum source in VMware workstaion