第一步 安装 vsftpd
1、检查安装vsftpd软件 rpm -qa |grep vsftpd
2、 安装ftp软件yum -y install vsftpd
3、修改配置文件,去掉前面注释 vim /etc/vsftpd/vsftpd.conf
anon_upload_enable=YES
anon_mkdir_write_enable=YES
4、启动服务和查看配置 systemctl restart/status vsftpd
第二步创建目录并创建索引(企业一般采用公共私有源【官方下载的包和自己创建的包】)
服务端配置
mkdir /var/ftp/installpkg/
cd /var/ftp/installpkg
createrepo . #创建空的索引
cp *.rpm /var/ftp/installpkg/
第三步:更新源
createrepo --update .
第四步:[客户端配置并清理缓存]
rsync -aSH --delete /etc/yum.repos.d/local.repo node2:/etc/yum.repos.d/
[redhat7.3]
name=redhat7.3
baseurl="ftp://xx.xx.xx.xx/installpkg"
enabled=1
gpgcheck=0
#清理缓存
yum clean all
yum -y install xxxxx
网友评论