搭建局域网ftp-yum服务器

无防范的配置:(初学者用)

1.安装createrepo和vsftpd
    yum install createrepo vsftpd

2.mkdir /home/ftp

3.cp -r 源的目录 /home/ftp

4.vi /etc/vsftpd/vsftpd.conf
    最后添加anon_root=/home/ftp和no_anon_password=YES

6.cd /home/ftp

7.createrepo CentOS7-LocalServer/

8.关闭防火墙和selinux
    systemct disable firewalld
    systemctl stop firewalld
    vi /etc/selinux/config
    将SELINUX改为disabled
    reboot

9.systemctl enable vsftpd

10.systemctl start vsftpd

1.客户端配置源
    vi /etc/yum.repos.d/CentOS7-LocalServer.repo
   
    [CentOS7-LocalServer]
    name=LocalServer
    baseurl=ftp://192.168.1.119/CentOS7-LocalServer
    enable=1
    gpgcheck=0
   
2.yum clean all

3.yum makecache

4.搭建完成,局域网ftp-yum服务器测试
    yum install samba

你可能感兴趣的:(搭建局域网ftp-yum服务器)