Quantcast
Channel: Welcome to Andy's Blog
Viewing all articles
Browse latest Browse all 10

rsync server 配置

$
0
0

安装 

 

 

# yum install rsync -y

 

配置

 

 

很简单 , 就三个配置文件

mkdir /etc/rsyncd

touch /etc/rsyncd/rsyncd.conf

ln -s /etc/rsyncd/rsyncd.conf /etc/rsyncd.conf

1. /etc/syncd/rsync.conf

# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This line is required by the /etc/init.d/rsyncd script
# GLOBAL OPTIONS
uid = nobody                       
gid = nobody                                
 
use chroot = no                             
 
read only = yes                            
 
#limit access to private LANs
hosts allow=*
#hosts deny=*                                
max connections = 50                      
 
pid file = /var/run/rsyncd.pid             
 
secrets file = /etc/rsyncd/rsyncd.secrets   
#lock file = /var/run/rsync.lock           
 
motd file = /etc/rsyncd/rsyncd.motd        
 
#This will give you a separate log file
log file = /var/log/rsync.log               
 
#This will log every file transferred - up to 85,000+ per user, per sync
transfer logging = yes                    
 
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
 
# MODULE OPTIONS
 
[syncbig]
path = /var/tmp/synctest/big/
list=yes
ignore errors
auth users = ctpass
comment = sync_big
 
[syncsmall]
path = /var/tmp/synctest/small/
list=yes
ignore errors
auth users = ctpass
comment = sync_small 
 
 
2. /etc/rsyncd/rsyncd.motd
=========================
= happy     downloading =
=========================
 
3. /etc/rsyncd/rsyncd.secrets
ctpass:yourpassword
 
 

启动

 
 
 
# rsync --daemon
 
客户端连接
 
$ rsync -avzP ctpass@server_ip::syncbig /var/tmp/
 
 
 
 

Viewing all articles
Browse latest Browse all 10

Trending Articles