In the production environment, there was a time when two servers could not connect to the external network, and it was a waste of time to upload the mirror image as the local source because the mirror image was too large. At this time, the other server could use HTTP to download the software. Operations of actual combat: two servers HTTP share yum software warehouse operations of actual combat: two ways to share yum repositories IP server HTTP: 172.16.1.112, 172.16.1.100 system version: Centos7

[root@localhost ~]# mount /dev/cdrom/MNT and create a 123.repo file under /etc/yum.repos.d/

[123] name=123 BaseURL =file:///mnt gpgcheck=0 enabled=1 Test [root@localhost ~]# yum install -y Telnet FastestMirror Loading mirror speeds from cached hostfile

Dependency resolution

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Package schema version source size

Telnet x86_64 1:0.17-64.el7 123 64k

The transaction summary

Install 1 package

Total Downloads: 64 K M.E. Packages: Running transaction check Running transaction test Transaction test Succeeded Running transaction 1: Telnet -0.17-64.el7.x86_64 1/1: Telnet -0.17-64.el7.x86_64 1/1: Telnet -0.17-64.el7.x86_64 1/1: Telnet -0.17-64.el7.x86_64 1/1: Telnet -0.17-64.el7.x86_64 1/1

Instaled: telnet.x86_64 1:0.17-64.el7

Finished! [root@localhost ~]# 172.16.1.100 Share with Apache Image [duh ~]# yum install -y HTTPD create aaa directory under /var/www/html,

/var/ WWW/HTML/create aaa directory, Copy the image to /var/www/ HTML /aaa [root@localhost ~]# ls /var/www/ HTML /aaa/ CentOS_BuildTag EULA images LiveOS repodata RPM-gpG-key-centos-7 isolinux Packages RPM-gpG-key-centos-7 TRANS. Tbl Packages RPM-gpG-key-centos-7 TRANS. Tbl Packages RPM-gpG-key-centos-7 TRANS. Two servers HTTP sharing YUM software warehouse operation and maintenance practice: two servers HTTP sharing YUM software warehouse

Create 123.repo in /etc/yum.repos.d/

[123] name=123 BaseUrl =http://172.16.1.100/aaa Enabled =1 GPGCheck =0 Test [nil ~]# yum install VSFTPD -y FastestMirror Loading Mirror speeds from cached hostfile resolving dependencies……

Total Downloads: 169 K 348 K podcasts: VSFTPD – 3.0.2-22. El7. X86_64. RPM | 169 kB 00:00:00 Running transaction check Running transaction test transaction test The Succeeded Running Transaction is being installed: vsftpd-3.0.2-22.el7.x86_64 1/1 In verification: vsftpd-3.0.2-22.el7.x86_64 1/1

Instaled: vsftpd.x86_64 0:3.0.2-22.el7

Finished! In summary, the HTTP YUM source is implemented by Apache.