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

Rsync daemon server-side installation configuration steps

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Check whether rsync is installed

Rpm-qa rsync

Yum install rsync openssh-clients-y

2. Add user rsync

Useradd rsync-s / sbin/nologin-M

Tail-1 / etc/passwd

3. Configure rsyncd.conf

Vim / etc/rsyncd.conf

# rsync_config___start

# # rsyncd.conf start##

Uid = rsync / / virtual user, remote commands need to use rsync to access the shared directory

Gid = rsync / / Virtual user group

Use chroot = no / / Security

Max connections = 200 / / maximum connections

Timeout = 300 / / timeout setting

Pid file = / var/run/rsyncd.pid

Lock file = / var/run/rsync.lock / / lock the file to avoid conflicts. Avoid simultaneous operations

Log file = / var/log/rsyncd.log / / log

[backup] / / Module name

Path = / backup / / Server-side nfs shared directory

Ignore errors / / ignore errors

Read only = false / / Readable and writable permissions

List = false / / disallowed list, ls

Hosts allow = 172.16.1.0 Compact 24 / / allowed hosts

# hosts allow = 10.0.0.0amp 24

Hosts deny = 0.0.0.0amp 32 / / rejected host

Auth users = rsync_backup / / Virtual user

Secrets file = / etc/rsync.password / / password file

# rsync_config___end

4. Configure rsync_backup user files

Echo "rsync_backup:123123" > / etc/rsync.password

Chmod 600 / etc/rsync.password (set permissions)

5. Create a shared directory and authorize rsync service management

Mkdir backup-p

Chown rsync.rsync / backup

6. Start the rsync service and check

Rsync-daemon

Ps-ef | grep rsync | grep-v grep

Lsof-I: 873

Netstat-lntup | grep 873

7. Join the boot boot

Echo "/ usr/bin/rsync-- daemon" > > / etc/rc.local

Tail-1 / etc/rc.local

Troubleshooting:

Rsync server startup error: failed to create pid file / var/run/rsyncd.pid: File exists

Problem: Rsync server startup error under linux-- > failed to create pid file / var/run/rsyncd.pid: File exists

Solution: rm-rf / var/run/rsyncd.pid; and restart the Rsync service (rsync-daemon)

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