Centos7中rsync的安装
准备两台虚拟机
服务器 192.168.1.215
客户端 192.168.1.202
服务端安装rsync
安装
[root@bogon ~]# yum -y install rsync
修改配置文件
[root@bogon ~]# vim /etc/rsyncd.conf
添加以下行
[root@bogon ~]# mkdir /world
自定义欢迎信息
[root@bogon ~]# vim /etc/rsyncd.welcome
开启服务,关闭防火墙,降低沙盒
[root@bogon ~]# systemctl stop crond
[root@bogon ~]# systemctl start rsyncd
[root@bogon ~]# iptables -F
[root@bogon ~]# setenforce 0
创建文件,做测试要用到
[root@bogon ~]# touch /world/{1…10}.txt
客户端配置
安装
[root@bogon ~]# yum -y install rsync
创建同步目录
[root@bogon ~]# mkdir