`
刘金剑
  • 浏览: 144695 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

linux安装rsync命令

阅读更多
rsync命令运行提示连接超时解决方法
1、在root权限下执行visudo命令
2、在以下的内容下添加一行用户信息
## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL
ec2-user        ALL=(ALL)       NOPASSWD: ALL

3、保存退出即可
4、执行文件同步命令
sudo rsync -av 172.31.7.42::xx1/style.zip /usr/local/static2/







rsync命令安装步骤:
1、sudo yum install rsync
2、vim /etc/rsyncd.conf
如下如下代码:
uid = root
gid = root
max connections = 10
use chroot = no
pid file=/var/run/rsyncd.pid
log file=/var/log/rsyncd.log

[xx1]
path = /dirname/
comment = new
read only=no

备注:dirname是当前需要同步的文件目录
保存退出

3、启动rsync服务命令
/usr/bin/rsync --daemon

4、执行文件同步命令

rsync -av ip::xx1/filename  /本地路径

{
xx1 是标识符
dirname 是本地文件夹
read only = yes ,就是只读,no 就是许可外部服务器推送回来,可能会覆盖旧文件。
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics