rsync 配置

yum install rsync

vim /etc/rsyncd.conf

输入如下内容:

 

uid = user
gid = user
use chroot = false
max connections = 10
strict modes = false
port = 873
#address = 
log file = /data/rsync/var/log/rsyncd.log
pid file = /data/rsync/var/run/rsyncd.pid
lock file = /data/rsync/var/run/rsyncd.lock

[combine]
path = /data/projects/combine
ignore errors = true
read only = false
write only = false
list = no
hosts allow =ipaddr


mkdir /data/rsync/var/log/ -p

mkdir /data/rsync/var/run/ -p

启动服务: /etc/init.d/rsync start

查看服务:

bigdata03:~# ps aux | grep rsy
root      8040  0.0  0.0  18504   952 ?        Ss   10:17   0:00 /usr/bin/rsync --daemon --no-detach
root      8059  0.0  0.0  18680   940 pts/0    S+   10:18   0:00 grep rsy

 

你可能感兴趣的:(服务器脚本)