rsync 3.1.1源代码编译安装配置
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源代码编译安装配置的更多相关文章
- 在 Mac OS X 环境中从源代码编译安装 FFmpeg
最近因为一个项目要求,需要开发实时视频编解码功能,准备采用 FFmpeg 以 x264 方式进行实时的视频编解码.Windows 以及 Linux 环境下的 FFmpeg 动态库.头文件等资源都非常容 ...
- Python3源代码编译安装
Python3源代码编译安装 安装必要工具 yum-utils ,它的功能是管理repository及扩展包的工具 (主要是针对repository) $ sudo yum install yum-u ...
- 源代码编译安装Python3.5.2
由于没有找到Python3.5的rpm安装包,因此进行源代码编译安装 1.下载Python3.5.2 [root@seastar ~]# cd /usr/local/src [root@seastar ...
- haproxy1.7编译安装配置
#haproxy1.7编译安装配置#高可用.负载均衡 使用 #haproxy1.7编译安装配置 #centos7 x86_64 #高可用.负载均衡 使用 #下载 #http://www.haproxy ...
- azkaban编译安装配置文档
azkaban编译安装配置文档 参考官方文档: http://azkaban.github.io/azkaban/docs/latest/ azkaban的配置文件说明:http://azkaban. ...
- linux源代码编译安装OpenCV
为了尽可能保证OpenCV的特性,使用OpenCV源代码编译安装在linux上.先从安装其依赖项開始,以ubuntu 14.04.X为例解说在Linux上源代码编译安装OpenCV,其它linux版本 ...
- Linux 环境中从源代码编译安装 ReText 问题与解决
从源代码编译安装 ReText 问题与解决 1. 如何安装 Python Markups 1.1 从 https://launchpad.net/python-markups 下载 Python Ma ...
- cloudera impala编译 安装 配置 启动
无论是采用GDB调试impala或者尝试修改impala源码,前提都是需要本地环境编译impala,这篇文章详细的分享一下impala编译方法以及编译过程遇到的棘手的问题: 前言: impala官方的 ...
- SUSE Linux源代码编译安装MySQL 5.6
这篇文章主要介绍了SUSE Linux下源代码编译方式安装MySQL 5.6过程分享,本文使用SUSE Linux Enterprise Server 10 SP3 (x86_64)系统,须要的朋友能 ...
随机推荐
- C# 實現文件壓縮-- 背景:服務器Log.txt 過多,佔用過多硬盤空間,壓縮備份后節省空間資源
1.壓縮實現代碼如下: 調用ICSharpCode.SharpZipLib.dll(free software,可以搜到源碼). 轉移指定目錄文件夾轉移到目標文件夾 壓縮目標文件夾 刪除目標文件夾 u ...
- 使用cmd查看Tensorboard的生成图
代码中"graph_practice7/"文件存放的是生成的神经网络图 现在要查看这个图,使用cmd 进入文件指定目录(我的文件存储地址是E:\workspace\PycharmP ...
- vue全选和取消全选
代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- 01CSS使用方法
CSS使用方法 内联定义 内联定义即是在对象的标记内使用对象的style属性定义适用其的样式表属性. 内部样式表 <style type="text/css"></style> ...
- JAVA基础——IO流字符流
字符流 字节流提供了处理任何类型输入/输出操作的功能(因为对于计算机而言,一切都是0和1,只需把数据以字节形式表示就够了),但它们不可以直接操作Unicode字符,因为上一篇文章写了,一个Unicod ...
- live555简介
live555 编辑 目录 1live555简介 2Live555 Streaming Media整体框架 3openRTSP客户端流程 1live555简介编辑 Live555 是一个为 ...
- xshell连接不了虚拟机处理方法(错误提示:Connection closing...Socket close.Connection closed by foreign host.Disconnected from remote host(localhost) at 08:47:23.)
一.问题描述:xshell连接不了虚拟机,出现错误提示:Connection closing...Socket close.Connection closed by foreign host.Disc ...
- CSS+DIV命名
原地址:http://www.cnblogs.com/hylaz/archive/2012/10/27/2742743.html#2521377 页头:header 登录条:loginBar 标志:l ...
- LeetCode 167. Two Sum II – Input array is sorted
Given an array of integers that is already sorted in ascending order, find two numbers such that the ...
- Linux读取网卡流量脚本
#!/bin/bash #eval `date "+day=%d; month=%m; year=%Y; hour=%H; minute=%M second=%S"` #INSTF ...