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. node.js编译less文件

    大多数文章对于到底怎样编译less文件并没有一个详细的说明,清一色的grunt命令,看得也是晕晕的,所以也就有了这篇手记的存在. 步入正题 1.安装配置好sublime text3(包括各种实用插件) ...

  2. 【JavaScript从入门到精通】第三课

    第三课 初探JavaScript魅力-03 函数传参 上节课的时候我们已经讲了什么是函数,实际上,函数在功能上就类似于css的class一样,将一段代码包裹起来使用.为了让函数的功能更加的丰富和实用, ...

  3. selenium webdriver 常用断言

    断言常用的有: assertLocation(判断当前是在正确的页面). assertTitle(检查当前页面的title是否正确). assertValue(检查input的值, checkbox或 ...

  4. python compare with other language

    java http://dirtsimple.org/2004/12/python-is-not-java.htmlhttp://twistedmatrix.com/users/glyph/rant/ ...

  5. python 调用exe程序

    #!/usr/bin/python #-*- coding:utf-8 -*- import os, subprocess import tkMessageBox import msg_box def ...

  6. [Luogu] P4910 帕秋莉的手环

    题目背景 帕秋莉是蕾米莉亚很早结识的朋友,现在住在红魔馆地下的大图书馆里.不仅擅长许多魔法,还每天都会开发出新的魔法.只是身体比较弱,因为哮喘,会在咏唱符卡时遇到麻烦. 她所用的属性魔法,主要是生命和 ...

  7. Python 绑定方法与非绑定方法

    用到的: import uuid  --------------  uuid是128位的全局唯一标识符, 通常用32位的一个字符串的形式来表现 uuid.uuid1()  -------------  ...

  8. 输出一定范围unicode对应符号

    #本程序没有考虑对0x的处理,请勿输入,直接输入16进制位即可 begin = input("起始点:") end = input("结束点:") b_int0 ...

  9. Hadoop2.x异常总结

    问题1: 在执行bin/hdfs namenode -format格式化HDFS命令时,抛出异常,异常如下: 16/10/26 18:32:45 ERROR namenode.NameNode: Fa ...

  10. MySQL Connector/Python 接口 (三)

    本文参见这里. 使用缓冲的 cursor,下例给从2000年加入公司并且还在公司的员工薪水从明天起加15% from __future__ import print_function from dec ...