Rsync Service Installation

Source: Internet
Author: User

1. Rsync is an open-source project. First, go to the official website to download the installation package.

Http://rsync.samba.org/ftp/rsync/src/

Here I download 3.1.0.tar.gz

Decompress the package to the/opt/rysnc310 folder. You can directly change the name of the decompressed folder.

 

2. install three axes. You don't need to talk about this.

For example, add the number of prefix partitions in other places.



 


3. Configuration

VI/etc/rsyncd. conf

Enter the following information.

Uid = root

Gid = root

PID file =/var/run/rsyncd. PID

Lock file =/var/run/rsyncd. Lock

Log File =/var/log/rsyncd. Log

Motd file =/etc/rsyncd. motd

 

[Bi_web] # configure the transfer folder on the server

Path =/data/website # server transmission folder

Read Only = No

List = Yes

Hosts allow = * # accept all IP addresses

Auth users = bitrans

Secrets file =/etc/rsyncd. Secrets # Password File

 

Generate the password file:

Echo "bitrans: bipd">/etc/rsyncd. Secrets, which is in a more strict format than encrypt and must be in the username: Password format

Chmod 600/etc/rsyncd. secrets must be unavailable to other users.

 

Client:

The installation is the same. No configuration file is required until makeinstall.

Generate a file to transfer the token.

Echo "test"> rsync. Log


Generate the password file. The password must be consistent with the server configuration.



The transfer token is successfully tried.



Rsync-vzrtopgp is basically the default value. If it is changed to another port, the -- Port = port number must be added.

Files transmitted by rsync. Log

[Email protected]: bi_web bitrans is the username configured on the server.

Bi_web is the folder configured on the server.

-- Password-file = bitrans. Pass: Specifies the password file, which must be chmod600.

The server can see the file.

 

4. Restart

Kill processes at high speed

CAT/var/run/rsyncd. PID | xargs kill-9

Start

/Usr/bin/rsync-daemon (delete the PID file to restart)

Check whether startup is enabled

Netstat-Na | grep 873

 

You do not need to restart the rsync to change the configuration:

Edit it in/etc/xinetd. d/rsync and set disable to no

/Etc/init. d/xinetd restart. The configuration file read by xinetd is/etc/rsyncd. conf.

Note that no separate rsync process exists.

 

 

Rsync Service Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.