1. 安装vsftpd软件
yum install -y vsftpd
2. 启动ftp
systemctl enable vsftpd
systemctl start vsftpd
3. 上传系统进行到虚拟机,并配置
mkdir -p /var/ftp/centos7.4
vi /etc/rc.d/rc.local
mount -o loop /mnt/CentOS-7-x86_64-DVD-1708.iso /var/ftp/centos7.4
chmod a+x /etc/rc.d/rc.local
windows验证
4. 配置yum仓库
cat >/etc/yum.repos.d/ftp_7.repo <<EOF
[ftp]
name=ftpbase
baseurl
enabled=1
gpgcheck=0
EOF
yum clean all
yum makecache