• Linux RSync 搭建


    安装:

    • yum -y install xinetd

    端口开放:

    • iptables -A INPUT -p tcp -m state --state NEW  -m tcp --dport 873 -j ACCEPT

    服务端配置:

    • su - root
    • vim /etc/rsyncd.conf
    pid file = /var/run/rsyncd.pid
    log file = /var/log/rsyncd.log
    lock file = /var/run/rsync.lock
    
    address = 192.168.1.1
    port = 873
    uid = root
    gid = root
    use chroot = yes
    hosts allow = 192.168.1.0/255.255.255.0 192.168.2.0/255.255.255.0
    hosts deny = *
    max connections = 4
    
    [videoresource]
    path = /data/resource
    read only = no
    write only = no
    list = yes
    ignore errors
    auth users = root
    secrets file = /etc/rsyncd.secrets
    comment = This is 192.168.1.1
    • vim /etc/rsyncd.secrets 
    root:123456
    • chmod 600 /etc/rsyncd.secrets
    • /usr/bin/rsync --daemon --config=/etc/rsyncd.conf

    客户端:

    • vim /etc/rsyncd.secrets
    123456
    • chmod 600 /etc/rsyncd.secrets

    测试:

    • /usr/bin/rsync --list-only root@192.168.1.1::videoresource --password-file=/etc/rsync.secrets

    本地同步:

    • /usr/bin/rsync -vzrtopg  --progress  /data/* /data1/*

    上传:

    • /usr/bin/rsync -vzrtopg  --progress  /data/* root@192.168.1.1::videoresource

    下载(限速5MB):

    • /usr/bin/rsync -vzrtopg  --progress  --bwlimit=5000 root@192.168.1.1::videoresource/* /data/

    参考文献:http://www.cnblogs.com/itech/archive/2009/08/10/1542945.html

    参考文献:http://www.linuxidc.com/Linux/2016-10/136143.htm

    参考文献:http://sookk8.blog.51cto.com/455855/328076/

  • 相关阅读:
    常见的医学影像数据格式
    如何加到可选Kernel中?(jupyter notebook)
    GITHUB(3.2)实际动手使用
    GITHUB(3.1)前期准备
    GITHUB(2.1-2.5)Git的导入
    GITHUB(1.5)GitHub提供的主要功能
    HTML
    python day21
    python day20
    python day19
  • 原文地址:https://www.cnblogs.com/jhc888007/p/7413570.html
Copyright © 2020-2023  润新知