In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to build rsync server". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Download rsync source package wget http://www.samba.org/ftp/rsync/rsync-3.1.2.tar.gztar-zxvf rsync-3.1.2.tar.gzcd rsync-3.1.2 configuration + compile installation./ configure --prefix=/usr/local/rsync -disable-ipv6 #ipv6 will be enabled by default, we can cancel ipv6 directly in the compilation process make && make install to create the corresponding configuration file cd /usr/local/rsyncmkdir etcmkdir varvim ./ etc/rsyncd.conf log file = /usr/local/rsync/var/rsyncd.logpid file = /usr/local/rsync/var/rsyncd.pidlock file = /usr/local/rsync/var/rsyncd.locksecrets file = /usr/local/rsync/etc/rsyncd.passmotd file = /usr/local/rsync/etc//rsyncd.motdread only = yeshosts allow = 192.168.31.0/24list = yesuid = nobodygid = nobodyuse chroot = nomax connections = 60 [home_suse]path = /home/wwwroot/susecomment = www suseauth users = qxyrsy
rsync.conf is the configuration file, and the information in it is roughly explained
log file = /usr/local/rsync/var/rsyncd.log #Define log files pid file = /usr/local/rsync/var/rsyncd.pid #Define PID file lock file = /usr/local/rsync/var/rsyncd.lock #Lock file supporting max connections parameter secrets file = /usr/local/rsync/etc/rsyncd.pass #Define account password information file for authentication when client connects motd file = /usr/local/rsync/etc//rsyncd.motd #rsync welcome message page file location at startup (custom file content) read only = yes #Read only (must be set to NO if synchronizing from client to server) hosts allow = 192.168.31.0/24 #Allowed IP address segments list = yes uid = root #rsync starts as what user gid = root use chroot = no max connections = 60 #Maximum number of connections [home_suse] #Here is the definition of the directory that needs synchronization path = /home/wwwroot/suse #Specific file directory address comment = www suse #Description information, you can fill in any auth users = qxyrsy #Authenticate the username, which will later be written to rsyncd.pass to create the rsyncd.pass user password file vim rsyncd.pass #Username: Password qxyrsy:123456 Note here that the permissions of the rsyncd.pass file must be set to 600, otherwise the chmod 600 rsyncd.pass error will be reported. Start the rsync server and release the corresponding port rsync --daemon --config=/usr/local/rsync/etc/rsyncd.conf & netstat -tunlp can see that the listening port is 873 iptables -I INPUT -p tcp --dport 873 -j ACCEPT service iptables save client configuration
Centos as long as it is not a minimal installation system, generally has been pre-installed rsync, you can use it directly, but you can check it first.
rpm -qa | grep rsync The client only needs to create a new password file, and only fill in the password. cd /root vim rsyncd.pass 123456
Save exit and also set permissions to 600
Test whether you can get files from the server:
rsync -arP --password-file=/root/rsyncd.pass qxyrsy@192.168.31.10::home_suse /home/rsyntest"How to build rsync server" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.