Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Build rsync server by Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1 server configuration

1.1 turn off SELinux

Setenforce 0

1.2 install rsync

Yum install-y rsync

1.3Configuring rsync

Vi / etc/rsyncd.conf [rsync] path = / home/samba_back comment = Project document save location hosts allow = 192.168.1.1 + 32 hosts deny = 0.0.0.0 + 0 uid = rsync gid = rsync fake super = no auth user = rsync secrets file=/etc/rsyncd_users.dbvi / etc/rsyncd_users.dbrsync:Rsync@2019 # username: password

1.4 Open the rsync virtual account and add boot to boot

Rsync-daemonecho "/ etc/bin/rsync-- daemon" > > / etc/rc.localchmod + x / etc/rc.d/rc.local

1.5 create folders for virtual accounts and set permissions and user groups

Mkdir-p / home/samba_backchown-R rsync.rsync / home/samba_back

1.6 create a non-logged-in system account and set the password

The useradd rsync-s / sbin/nologin-Mpasswd rsync # password needs to be the same as the password in rsyncd_users.db

1.7 restart the rsync service

Systemctl restart rsyncd.service

2 client use

2.1 create a client password file

The echo "Rsync@2019" > / etc/rsyncd_user.db# password should be consistent with the previously created one.

2.2 start synchronization

Rsync-avz-delete-after rsync@::rsync-password-file=/etc/rsyncd_user.db

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report