centos7安装配置rsync

简介:

一、服务端(192.168.8.81):

  1. 安装软件:
    yum  -y  install  rsync
  2. 创建需同步的目录:
    mkdir  -p  /home/lee/rsync
  3. 编辑配置文件:vim /etc/rsync.conf
    motd file = /etc/rsyncd.motd
    transfer logging = yes
    log file = /var/log/rsyncd.log
    port = 873
    address = 192.168.8.81
    uid = nobody
    gid = nobody
    use chroot = no
    read only = no
    max connections = 10
    [common]
    comment = rsync lee
    path = /home/lee/rsync/
    ignore errors
    auth users = lee
    secrets file = /etc/rsyncd.secrets
    hosts allow = 192.168.8.0/255.255.255.0
    hosts deny = *
    list = false
  4. 创建用户密码:
    echo  "lee:123456"  >  /etc/rsyncd.secrets
    chmod  600  /etc/rsyncd.secrets
  5. 创建提示信息文件:
    echo  "rsync  lee"  >  /etc/rsyncd.motd
  6. 配置防火墙规则:
    iptables  -I  INPUT  -p  tcp  --dport  873  -j  ACCEPT
  7. 启动服务:
    rsync  --deamon
    echo  "rsync  --deamon"  >>  /etc/rc.local

    二、客户端(192.168.8.81):

  8. 安装软件:
    yum  -y  install  rsync
  9. 创建密码文件(免输入密码):
    echo  "123456"  >  /root/passwd
    chmod  600  /root/passwd
  10. 同步:
    rsync  -avz  --password-file=/root/passwd  lee@192.168.8.81::common  /home/lee/rsync/

    centos7安装配置rsync

 本文转自 Lee_吉 51CTO博客,原文链接:http://blog.51cto.com/12173069/2069243

相关文章
|
开发工具 安全 Linux
centos6编译安装vsftpd3.0.3
一,下载vsftp3.0.3 wget https://fossies.org/linux/misc/vsftpd-3.0.3.tar.gz 二,安装所需插件 yum install pam yum install pam-devel yum install db4-utils 三,安装vsftp tar zxf vsftpd-3.
2055 0
|
Linux 数据安全/隐私保护 网络协议
centos7安装配置rsync以及遇到问题
安装 服务端 安装软件: yum -y install rsync 创建需同步的目录: mkdir -p /data 编辑配置文件:vim /etc/rsyncd.conf motd file = /etc/rsyncd.
2790 0
|
Web App开发 测试技术 Linux
|
Unix 数据安全/隐私保护 Shell

热门文章

最新文章