Configuration of SHELL script remote yum source and installation of yum repository
Remote yum warehouse 1. The remote server yum source script is as follows: #! / bin/bash# mount image file mount / dev/sr0 / mnt# install ftp service yum install vsftpd-y # create ftp site cd / var/ftpmkdir centos7mkdir othercp-rf / mnt/* centos7/ & createrepo-g / mnt/repodata/repomd.xml other/# enable service systemctl start vsftpd# close firewall systemctl stop firewalld.servicesetenforce 02. The local server installs the yum repository script as follows #! / bin/bash# installs the ftp service yum install ftp-y # backup file cd / etc/yum.repos.dmkdir bakmv * .repo bak# clears the yum cache yum clean allyum list# settings yum repository package source echo "[base] name=centos7.Packagesbaseurl= ftp://192.168.102.128/centos7enable=1gpgkey=1gpgkey=ftp://192.168.102.128/centos7/RPM-GPG-KEY-CentOS-7[other]name=other.Packagesbaseurl=ftp:" / / 192.168.102.128/otherenable=1gpgkey=0 "> centos7.repo# reloads yum repository yum list