Set up ftp sharing yum
1. Turn off the firewall
systemctl stop firewalld
systemctl disable firewalld
Close selinux
setenforce 0 //temporarily close
- Configure yum source
/etc/yum.repos.d/repo.repo
[centos]
name = centos
baseurl = file: /// opt / centos
enabled = 1
gpgcheck = 0
mkdir -p /dev/cdrom
mount /dev/cdrom /opt/centos
yum clean all; yum makecache
3.安装vsftpd
yum install -y vsftp
echo “anon_root=/opt” >> /etc/vsftpd/vsftpd
systemctl start vsftpd
systemctl enable vsftp
4. Web page verification
2. Make yum warehouse
yum install -y createrepo
mkdir /dvd/test
createrepo /dev/test
will generate a repodate file in the same directory as test
Finally, configure yum
[centos2]
name=centos2
baseurl=file:///dvd/test
enabled=1
gpgcheck=0