实操日记:Linux系统rsync配置和使用

运维 系统运维
Linux的应用者,都能想熟练地应用Linux。于是在自己的电脑上安装很多软件。这里讲解Linux系统rsync配置和使用教程 ,希望你能学会Linux系统rsync配置和使用的方法。

Linux的应用者,都能想熟练地应用Linux。于是在自己的电脑上安装很多软件。这里讲解Linux系统rsync配置和使用教程 ,希望你能学会Linux系统rsync配置和使用的方法。本试验的测试环境使用的系统是Redhat AS4(2台,一个服务端,一个客户端)

rsync服务端的ip:192.168.23.102
rsync客户端的ip:192.168.23.100

以下先配置服务器端:

1. 安装rsync包

[root@rhel403 old]# rpm -q rsync
rsync-2.6.3-1

2. rsync只使用一个配置文件就是/etc/rsyncd.conf

  1. [root@rhel403 old]# more /etc/rsyncd.conf   
  2. uid = nobody   
  3. gid = nobody   
  4. max connections = 200   
  5. timeout = 600   
  6. use chroot = no   
  7. read only = yes   
  8. pid file=/var/run/rsyncd.pid   
  9. host_allow =192.168.23.100 //客户端的IP地址写在这里   
  10. #syslog facility = local7   
  11. #log file=/var/log/rsyncd.log   
  12. #rsync config   
  13. #The 'standard' things   
  14. [rsync_gmmold] //定义同步的路径(客户端用这个关键字链接)   
  15. path = /gmm/old //需要同步的路径   
  16. comment = gmmold //这个暂不知道  

3.启动服务

#/usr/bin/rsync --daemon

4.加入开机启动

echo "/usr/bin/rsync --daemon" >> /etc/rc.local

5.检查rsync时候启动

# ps -ef | grep rsync

6.停止服务

#kill `cat /var/run/rsyncd.pid`

以下是客户端的配置:

1. 安装rsync包

[root@rhel403 old]# rpm -q rsync
rsync-2.6.3-1

2. 与服务器端同步:

#rsync -auqz 192.168.23.102::rsync_gmmold /tmp/old

完成以上你就学会Linux系统rsync配置和使用了。

【编辑推荐】

  1. 利用日志使管理Linux更轻松
  2. 操作笔记:Linux Framebuffer编程
  3. 详解介绍Linux文件种类
  4. 命令大全:Linux高级命令行技巧
  5. 简介Linux截屏工具:import
责任编辑:小霞 来源: pchome
相关推荐

2009-11-30 08:56:44

配置Linux服务器

2010-01-06 10:38:16

Linux安装JDK

2010-06-07 15:56:27

2010-05-20 15:53:15

配置MySQL

2009-11-30 13:05:00

Suse防火墙

2017-03-01 12:19:17

rsync Linux系统

2009-12-01 18:03:56

Linux版本

2010-05-04 17:49:39

Oracle安装

2010-10-25 13:17:21

Mono

2009-12-01 10:23:19

数据资料备份

2010-04-14 10:48:49

Oracle使用

2010-04-09 09:07:43

Oracle游标触发器

2009-09-11 02:49:00

2010-04-26 15:14:46

DNS负载均衡

2021-07-09 07:21:40

SpringBootRedisLUA

2023-12-28 08:00:00

数据库人工智能

2024-02-05 13:07:00

.NETTable组件

2010-06-11 17:12:53

Linux rsync

2010-04-29 12:23:58

Oracle 获取系统

2010-04-12 09:36:29

Oacle merge
点赞
收藏

51CTO技术栈公众号