如何让rsync通过xinetd在两个不同的端口上侦听?

我有多个服务器通过不同的端口上的rsync接收文件。 我想将它们合并到同一台物理服务器上,并让客户端继续将他们的文件导入到他们现在使用的同一个端口(即不同的备用端口)。

通常我会为每个人运行/usr/bin/rsync --daemon --port=x ,但是我试图通过centos 6中的xinetd来工作,因为这是'默认'的rsync服务器。 在/etc/services添加端口没有这样做(它应该在inetd下,但可能不是xinetd?)。 如果我手动运行守护进程并让xinetd运行一个它会运行(所以我不会阻止它完成),但是我仍然希望它们都能被xinetd运行。 我的问题是甚至可以做到?

作为一个方面,在rsync中:

 --port=PORT This specifies an alternate TCP port number for the daemon to listen on rather than the default of 873. See also the lqportrq global option in the rsyncd.conf manpage. 

lqportrq不会显示在任何人的rsync.d或谷歌search。 是什么赋予了?

您需要为每个想要使用的附加端口添加其他xinetdconfiguration。 每个端口在/etc/services都需要一个唯一的服务名称,例如:

 echo "rsync00 900/tcp" >> /etc/services 

然后在/etc/xinet.d/rsync00

 service rsync00 { flags = IPv6 socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon --config /etc/rsync00.conf log_on_failure += USERID }