centos6.x下使用xinetd管理rsync服务

系统环境说明:centos6.x,centos7.x下rsync直接可由systemd管理(无需使用xinetd)。

[root@meinv01 ~]# rpm -qa|grep xinetd
[root@meinv01 ~]# yum clean all &>/dev/null && yum makecache &>/dev/null
[root@meinv01 ~]# yum -y install xinetd
[root@meinv01 ~]# cat /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 = yes                  #<===默认是关闭状态,需打开此功能,由xinetd管理rsync
flags = IPv6
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
[root@meinv01 ~]# sed -i 's#yes#no#g' /etc/xinetd.d/rsync
[root@meinv01 ~]# /etc/init.d/xinetd restart            #<===重启服务
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@meinv01 ~]# netstat -lntup|grep 873     #<===873端口已被xinetd管理
tcp 0 0 :::873 :::* LISTEN 2569/xinetd

这样就可以使用xinetd服务管理rsync启动和停止了(要设置开启自启动还要配置chkconfig)

其他步骤:

创建 /etc/rsyncd.conf 和创建 /etc/rsync.password,这和之前配置 rsync同步的步骤是一样的,这里不再重复!

 

转载于:https://www.cnblogs.com/blog-tim/p/10724162.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值