rsync 配置:
#解压:
tar zxvf rsync-3.1.1.tar.gz
cd rsync-3.1.1
#编译安装
./configure --prefix=/usr/local/rsync
make
make install
#################服务端:
vi /etc/xinetd.d/rsync
将其中改成: disable = no
#随系统启动RSYNC
chkconfig rsync on
#配置/etc/rsyncd.conf(需要手动生成,不加注释)
uid = root
gid = root
use chroot = no
max connections = 4
strict modes = no
port = 873
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[test]
path = /data/test
hosts allow = 121.40.53.233
auth users = test
secrets file = /etc/rsync.pas
# 配置/etc/rsync.pas 用户密码
test:123qwe
#赋权限
chown root.root /etc/rsync.pas
chmod 600 /etc/rsync.pas
# 启动
/usr/local/rsync/bin/rsync --daemon
# 检查rsync
netstat -a | grep rsync
################# 客户端:
# 配置/etc/rsync.pas 用户密码
123qwe
#赋权限
chown root.root /etc/rsync.pas
chmod 600 /etc/rsync.pas
#同步文件
/usr/local/rsync/bin/rsync -vzrtopg --progress --exclude=.svn --delete test@121.40.172.94::test /home/backup --password-file=/etc/rsync.pas
/usr/local/rsync/bin/rsync -vzrtopg --progress --exclude=.svn --delete test@121.40.110.187::test /tmp/blockip --password-file=/etc/rsync.pas
rsync 文件同步 服务器和客户端配置
原创
©著作权归作者所有:来自51CTO博客作者apache323的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:linux crontab 目录
下一篇:设置服务器公钥登陆sh脚本
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
配置PPPOE服务器和客户端
配置PPPOE服务器和客户端实验目的:练习PPPOE服务器和客户端 实验拓扑: 实验过程:在虚拟平台上实现步骤如下 第一步:进行MAC地址的桥接,将建立的loopb
PPPOE 休闲 配置PPPOE服务器 配置PPPOE -
unity客户端与服务器数据同步 unity中服务器和客户端network
客户端 实现服务端基本逻辑 1.创建套接字Socket(TCP)Socket socketTcp = new Socket(AddressFamily.InterNetwork, SocketType
unity客户端与服务器数据同步 unity c# 网络 tcp/ip