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同步的步骤是一样的,这里不再重复!

  • 相关阅读:
    HashTable和HashMap
    TreeSet的剖析
    TreeMap--左旋右旋
    TreeMap的实现--红黑树
    AarryList和LinkedList比较
    由浅入深解析HashMap系列二---扩容
    由浅入深解析HashMap系列一---HashMap简单实现 增、删、查。
    由浅入深解析HashMap
    重入锁----ReentrantLock
    系统多语言实现
  • 原文地址:https://www.cnblogs.com/blog-tim/p/10724162.html
Copyright © 2011-2022 走看看