linux Sersync 上配置客户端

linux Sersync 上配置客户端,第1张

概述1、安装 Rsync 并配置相关权限   在 SERSYNC 上配置 RSYNC 客户端相关权限认证:     [[email protected] /]# yum install rsync -y     [[email protected] /]# echo "redhat" > /etc/rsync.password     [[email protected] /]# chmod 600

1、安装 Rsync 并配置相关权限

 

在 SERSYNC 上配置 RSYNC 客户端相关权限认证:

 

 

[[email protected] /]# yum install rsync -y

 

 

[[email protected] /]# echo "redhat" > /etc/rsync.password

 

 

[[email protected] /]# chmod 600 /etc/rsync.password

 

[[email protected] /]# cat /etc/rsync.password

 

Redhat

 

[[email protected] ~]# ll /etc/rsync.password

 

-rw-------. 1 root root 7 Jun 4 00:20 /etc/rsync.password

 

2、在 SERSYNC 上手动测试 rsync 的同步情况

 

特别强调:此步很关键,如果这不能同步,后面的 SERSYNC 配好了也不会同步数据。

 

1)分别创建待同步数据

 

@H_502_76@

 

[[email protected] ~]# touch /data/{web/index.HTML,download/a.jpg}

 

[[email protected] ~]# tree /data

 

/data

 

├── download

 

│  └── a.jpg

 

└── web

 

 

└── index.HTML

 

 

2 directorIEs,2 files

 

3)执行同步命令

 

针对 SWEB1(172.16.100.1):

 

 

[[email protected] ~]# rsync -avzP /data/web [email protected]::web/ --password-fil

 

 

e=/etc/rsync.password

 

 

sending incremental file List

 

 

web/

 

 

web/index.HTML

 

 

0 100%    0.00kB/s    0:00:00 (xfer#1,to-check=0/2)

 

 

sent 92 bytes received 31 bytes 246.00 bytes/sec

 

 

total size is 0 speedup is 0.00

 

 

[[email protected] ~]# rsync -avzP /data/download/ [email protected]::download/ --

 

 

password-file=/etc/rsync.password

 

sending incremental file List

 

./

 

a.jpg

 

0 100%    0.00kB/s    0:00:00 (xfer#1,to-check=0/2)

 

sent 75 bytes received 30 bytes 210.00 bytes/sec total size is 0 speedup is 0.00

 

 

[[email protected] ~]# rsync -avzP /data/web [email protected]::web/ --password-fil

 

e=/etc/rsync.password sending incremental file List web/

web/index.HTML

 

0 100%    0.00kB/s    0:00:00 (xfer#1,to-check=0/2)

 

 

sent 92 bytes received 31 bytes 246.00 bytes/sec

 

 

total size is 0 speedup is 0.00

 

 

[[email protected] ~]# rsync -avzP /data/download/ [email protected]::download/ --

 

 

password-file=/etc/rsync.password

 

 

sending incremental file List

 

 

./

 

 

a.jpg

 

 

0 100%    0.00kB/s    0:00:00 (xfer#1,to-check=0/2)

 

 

sent 75 bytes received 30 bytes 70.00 bytes/sec

 

 

total size is 0 speedup is 0.0

同步完之后,分别对 SWEB1,SWEB2 的相应目录进行查看!此处以 SWEB1 为例:提示: 在后面进行部署 SERSYNC 之前,SERSYNC 主服务器(即 SERSYNC)上必须要确保手动可以把 文件推送到 SWEB1,SWEB2 上,这样后续 SERSYNC 才能调用这些命令来自动推送。

 

 

[[email protected] ~]# tree /data/

 

/data/

 

├── download

 

│  └── a.jpg

 

└── web

 

└── web

 

└── index.HTML

总结

以上是内存溢出为你收集整理的linux Sersync 上配置客户端全部内容,希望文章能够帮你解决linux Sersync 上配置客户端所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/yw/1019856.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存