Centos6.8 install and configure rsync

Source: Internet
Author: User

Centos6.8 install and configure rsync
Install two packages in yum

yum install rsync xinetd
Enable the rsync service, restart the xinetd service, and disable SeLinux.
chkconfig rsync onservice xinetd restartsetenforce 0
Manually configure rsync content in the xinetd service

Specify the Service Startup parameter and find the row containing server_args.

server_args     = --daemon --config=/etc/rsyncd/rsyncd.conf
Manually create/etc/syscnd/directory and file
cd /etc/mkdir rsyncdcd rsyncdtouch /etc/rsyncd/rsyncd.conftouch rsyncd.passwd rsyncd.passwdchmod 600 rsyncd.passwdvi rsyncd.conf
Rsyncd. conf file content example
uid = rootgid = rootuse chroot = noread only = yes#limit access to private LANshosts allow=124.3.1.3/255.255.255.0 11.16.52.249/255.255.255.0hosts deny=*max connections = 5pid file = /var/run/rsyncd.pidsecrets file = /etc/rsyncd/rsyncd.passwd#lock file = /var/run/rsync.lock#motd file = /etc/rsyncd/rsyncd.motd#This will give you a separate log file#log file = /var/log/rsync.log#This will log every file transferred - up to 85,000+ per user, per synctransfer logging = yeslog format = %t %a %m %f %bsyslog facility = local3timeout = 300# MODULE OPTIONS[module]path = /var/www/html/test/list=yesignore errorsauth users = usernamecomment = test# exclude = cache/
Configure rsyncd. passwd
vi /etc/rsyncd/rsyncd.passwd

Add user name and password

username:password
Open the firewall iptables Port
vi /etc/sysconfig/iptables

Add a new row in the appropriate location

-A INPUT -m state --state NEW -m tcp -p tcp --dport 873  -j ACCEPT
Rsync command example
rsync -avz --progress  username@11.16.52.249::module ./test

Enter the password.

If you encounter any problems, check the system status.
getenforcenetstat -an | grep 873

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.