zoukankan      html  css  js  c++  java
  • 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同步的步骤是一样的,这里不再重复!

  • 相关阅读:
    element表格添加序号
    ZOJ 3822 Domination(概率dp)
    HDU 3037(Lucas定理)
    HDU 5033 Building(单调栈维护凸包)
    HDU 5037 Frog(贪心)
    HDU 5040 Instrusive(BFS+优先队列)
    HDU 5120 Intersection(几何模板题)
    HDU 5115 Dire Wolf(区间dp)
    HDU 5119 Happy Matt Friends(dp+位运算)
    C++ string详解
  • 原文地址:https://www.cnblogs.com/blog-tim/p/10724162.html
Copyright © 2011-2022 走看看