01.创建rsync文件vi /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
}
02.创建rsync配置文件vi /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = yes
max connections = 30
pid file=/var/run/rsyncd.pid
log file=/var/log/rsyncd.log
list = no
[5j_test]
path = /mnt/mfs/5j_test
hosts allow = 192.168.0.0/8
read only = no
03.重启服务
/etc/init.d/xinetd restart
说明:
有些机器上面可能没有安装xinetd服务需要yum install 一下!
现在可以测试
rsync -Rravz --port=873 --delete * 192.168.0.117::5j_test
将本地的文件推到这台rsync服务器上面去!一般配置采用这种形式即可满足需求了。
还可以用这种办法:
rsync -auz --files-from=rsync /home/unix-c/ 119.161.xxx.xxxx::5j_test
其中rsync文件内容如下
more rsync
a
b
以\n分开即可!
阅读(1022) | 评论(1) | 转发(1) |