{"title": "\u200bCentOS\u642d\u5efarsync\u670d\u52a1\u5668", "update_time": "2013-10-25 16:06:02", "tags": "xinetd rsync", "pid": "205", "icon": "linux.png"}
1.安装软件包 ``` yum install -y rsync yum install -y xinetd ``` 2.配置xinetd ``` sed -i '/disable/ s/yes/no/g' /etc/xinetd.d/rsync ``` 如果没有/etc/xinetd.d/rsync文件,直接复制以下内容到/etc/xinetd.d/rsync ``` # default: off # description: The rsync server is a good addition to an ftp server, as it \ # allows crc checksumming etc. service rsync { disable = no socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID } ``` 3.增加rsyncd配置 配置文件/etc/rsyncd.conf,内容如下(根据实际情况修改) ``` [hadoop] comment = hadoop path = /home/hadoop/hadoop uid = hadoop gid = hadoop use chroot = no read only = yes list = yes ``` 4.启动xinetd ``` /etc/init.d/xinetd start ``` 5.测试 ``` rsync rsync://localhost/ ``` 显示: ``` #rsync rsync://localhost/ hadoop hadoop ``` OK,完成!