http://rsync.samba.org/

rsync-3.1.1.tar.gz

---0.卸载rpm

# yum remove  rsync

-----1.安装:

tar -zxvf rsync-3.1.1.tar.gz

cd rsync-3.1.1

./configure --prefix=/usr/local/rsync --disable-ipv6

make

make install

ln -s /usr/local/rsync/bin/rsync /usr/local/bin/rsync

----2.server端配置

# vi /usr/local/rsync/rsyncd.conf

pid file = /var/run/rsyncd.pid
port = 873
pid = root
gid = root
use chroot = no
max connections = 200
timeout 600
lock file = /var/run/rsyncd.lock
log file = /var/run/rsyncd.log
secrets file = /usr/local/rsync/rsyncd.secrets
motd file = /etc/rsyncd.motd [test]
path = /test/
ignore errors
read only = true
list = false
hosts allow = *
#hosts deny = 0.0.0.0/32
auth users root #该用户系统中存在且对后面指定的备份文件夹拥有权限
comment = ocpyang test #vi /usr/local/rsync/rsyncd.motd ++++++++++++++++++++++++++++++++++++
Wlecome to ocpyang rsync services
++++++++++++++++++++++++++++++++++++ --指定rsync訪问的password,password不须要和系统账号password同样 # vi /usr/local/rsync/rsyncd.secrets
root:snow01 ln -s /usr/local/rsync/rsyncd.conf /etc/rsyncd.conf
ln -s /usr/local/rsync/rsyncd.motd /etc/rsyncd.motd
ln -s /usr/local/rsync/rsyncd.secrets /etc/rsyncd.secrets chmod 600 /usr/local/rsync/rsyncd.secrets chown root:root /usr/local/rsync/rsyncd.secrets 启动rsync # /usr/bin/rsync --daemon --config=/etc/rsyncd.conf # echo "/usr/bin/rsync --daemon --config=/etc/rsyncd.conf" >> /etc/rc.d/rc.local # cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff. touch /var/lock/subsys/local
/usr/bin/rsync --daemon # netstat -lntp | grep 873
tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN 10689/rsync
tcp 0 0 :::873 :::* LISTEN 10689/rsync --新建測试文件
#dd if=/dev/zero of=/test/t01.file bs=1M count=50 #pkill rsync ----3.client服务器配置 (1).新建clientpassword文件(client不带username) #vi /etc/rsyncd.secrets
snow01 #chmod 600 /etc/rsyncd.secrets rsync -vzrtopg --progress --delete root@192.168.5.189::test /ocpyang/ rsync -vzrtopg --progress --delete root@192.168.5.189::test /ocpyang/ --password-file=/etc/rsyncd.pwd (3).新建同步脚本 # vi /rsync.sh
#!/bin/bash rsync -vzrtopg --progress --delete root@192.168.5.189::test /testbak/ rsync -vzrtopg --progress --delete root@192.168.5.189::test /testbak/ --password-file=/etc/rsyncd.pwd (4).手动同步文件 #cd /
#./rsync.sh (5).自己主动同步:每隔五分钟同步一次
# crontab -e
0,5 * * * * /rsync.sh

rsync 3.1.1源代码编译安装配置的更多相关文章

  1. 在 Mac OS X 环境中从源代码编译安装 FFmpeg

    最近因为一个项目要求,需要开发实时视频编解码功能,准备采用 FFmpeg 以 x264 方式进行实时的视频编解码.Windows 以及 Linux 环境下的 FFmpeg 动态库.头文件等资源都非常容 ...

  2. Python3源代码编译安装

    Python3源代码编译安装 安装必要工具 yum-utils ,它的功能是管理repository及扩展包的工具 (主要是针对repository) $ sudo yum install yum-u ...

  3. 源代码编译安装Python3.5.2

    由于没有找到Python3.5的rpm安装包,因此进行源代码编译安装 1.下载Python3.5.2 [root@seastar ~]# cd /usr/local/src [root@seastar ...

  4. haproxy1.7编译安装配置

    #haproxy1.7编译安装配置#高可用.负载均衡 使用 #haproxy1.7编译安装配置 #centos7 x86_64 #高可用.负载均衡 使用 #下载 #http://www.haproxy ...

  5. azkaban编译安装配置文档

    azkaban编译安装配置文档 参考官方文档: http://azkaban.github.io/azkaban/docs/latest/ azkaban的配置文件说明:http://azkaban. ...

  6. linux源代码编译安装OpenCV

    为了尽可能保证OpenCV的特性,使用OpenCV源代码编译安装在linux上.先从安装其依赖项開始,以ubuntu 14.04.X为例解说在Linux上源代码编译安装OpenCV,其它linux版本 ...

  7. Linux 环境中从源代码编译安装 ReText 问题与解决

    从源代码编译安装 ReText 问题与解决 1. 如何安装 Python Markups 1.1 从 https://launchpad.net/python-markups 下载 Python Ma ...

  8. cloudera impala编译 安装 配置 启动

    无论是采用GDB调试impala或者尝试修改impala源码,前提都是需要本地环境编译impala,这篇文章详细的分享一下impala编译方法以及编译过程遇到的棘手的问题: 前言: impala官方的 ...

  9. SUSE Linux源代码编译安装MySQL 5.6

    这篇文章主要介绍了SUSE Linux下源代码编译方式安装MySQL 5.6过程分享,本文使用SUSE Linux Enterprise Server 10 SP3 (x86_64)系统,须要的朋友能 ...

随机推荐

  1. cpio - 存取归档包中的文件

    总览 (SYNOPSIS) cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] [-O [[user@]host:]a ...

  2. wifi钓鱼之--Pumpkin

    无线钓鱼   前言:请准备一块rt3070的外接网卡 Pumpkin是一款无线安全检测工具WiFi-Pumpkin的使用,利用该工具可以伪造接入点完成中间人攻击,同时也支持一些其它的无线渗透功能.旨在 ...

  3. E. String Multiplication

    E. String Multiplication time limit per test 2 seconds memory limit per test 256 megabytes input sta ...

  4. 【转】MFC 自定义edit 限制输入十六进制内容 响应复制粘贴全选剪切的功能

    参考地址:MFC 自定义edit 限制输入内容 响应复制粘贴全选剪切的功能   Ctrl组合键ASCII码 ^Z代表Ctrl+z                     ASCII值 控制字符  AS ...

  5. Mac OS X 中安装 brew

    不想被误导?直接看官方文档:   http://mxcl.github.com/homebrew/    先安装Git,打开一个shell cd /usr/local sudo mkdir homeb ...

  6. 【原】常用shell命令

    #ss -ln  监听常用端口 #netstat -an |grep 80    80端口被占用情况 #linux 下使用 tc 模拟网络延迟和丢包

  7. “完美”解决微信小程序购物车抛物动画,在连续点击时出现计算错误问题,定时器停不下来。

    最近做,微信点餐小程序,遇到添加商品时出现抛物动画,参考借鉴了这位大神的方法 https://www.cnblogs.com/greengage/p/7815842.html 但出现了一个问题,连续点 ...

  8. gulp(1) 的使用

    1.安装node.js 2.全局安装gulp.js npm install gulp -g 3.在项目本地根目录再安装(通过黑窗口安装)npm install --save-dev gulp/ 或者 ...

  9. 零基础入门学习Python(29)--文件:一个任务

    知识点 一个任务:将文件(record.txt)中的数据进行分割并按照以下规律保存起来: #record.txt文件内容: 小客服:小甲鱼,今天有客户问你有没有女朋友? 小甲鱼:咦?? 小客服:我跟她 ...

  10. C#基础学习(二)

    ---恢复内容开始--- 面向对象 (类是不占内存,实例占内存) C#与python不用可以直接从另一个文件直接实例化一个类,不需要导包:                                ...