1. download and install mkdir-p/root/softcd/root/softwget-cftp: // your
1. download and install
Mkdir-p/root/soft
Cd/root/soft
Ftp://ftp.samba.org/pub/rsync/rsync-3.0.8.tar.gz wget-c
Tar-zxvf rsync-3.0.8.tar.gz
Cd rsync-3.0.8
./Configure -- prefix =/usr/local/rsync
Make
Make install
======================================
Rsync server configuration:
1. create a folder:
Mkdir-p/etc/rsyncd/
Mkdir-p/home/aa
2. Create the main configuration file vim/etc/rsyncd. conf.
Log file =/var/log/rsyncd. log
Pid file =/var/run/rsyncd. pid
Lock file =/var/run/rsyncd. lock
# Port = 873
Uid = root
Gid = root
Use chroot = no
Read only = yes
Max connections = 5
# Hosts allow = *
# Hosts deny = *
[Aa]
Path =/home/aa
Ignore errors
List = no
Auth users = root, koko
Secrets file =/etc/rsyncd. secrets
Exclude = new/asdfg/
3. edit the password file, which is a plaintext text file: vim/etc/rsyncd. secrets
Root: 123
Koko: 123
Save and modify the file permission: chmod 600/etc/rsyncd. secrets
4. start:/usr/bin/rsync -- daemon -- config =/etc/rsyncd. conf
5. check whether Port 873 is available: netstat-naltp
--- Now The rsync server has been configured!
======================================
Rsync client configuration:
Create a file on the client to save the rsync server user password, vim/etc/rsyncko. pass
123 # Password defined in the server password file
Save and modify the file permission: chmod 600/etc/rsyncko. pass
--- Now The rsync client has been configured!
======================================
Client synchronization server command:
Rsync-vzrtopg -- progress -- delete root@192.168.1.105: aa/home/aa -- password-file =/etc/rsyncko. pass
========================================================== ================
Install cwrsync in Windows:
: Http://sourceforge.net/projects/sereds/files/cwRsync
1. after installation, add the installation directory to the path variable of windows, so that you can directly call the rsync command under the command line.
2. open the command line window and execute
Rsync-vzrtopg -- progress -- delete root@192.168.1.105: aa/cygdrive/e/koko
Now cwrsync starts to help us synchronize data!
Author: Magic World"