首页 > 技术文章 > linux centos 安装配置rsync

simon-sun 2013-11-06 19:03 原文

先安装rsync

yum install rsync 

 

创建文件,并配置权限

touch /etc/rsyncd.conf
touch /etc/rsyncd.secrets  
chmod 600 /etc/rsyncd.secrets 
touch /etc/rsyncd.motd  

 

写入数据

vim /etc/rsyncd.conf

 

 

配置密码文件

vim /etc/rsyncd.secrets

## 用户名:密码。注意这个不是系统用户,只是rsync用户。所以不用useradd。
root:pwd


更改文件权限

chmod 666 /etc/rsyncd.secrets

 

配置欢迎信息

vim /etc/rsyncd.motd 
Welcome the rsync services!

 

 

 

 

 

 

附加

 vim /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 = on
        flags           = IPv6
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon
        log_on_failure  += USERID
}

可以看到rysnc服务是关闭的(disable = yes),这里把它开启,把disable的值改为no

 

 

推荐阅读