Linux rsync安装配置

环境

      服务器主机地址:192.168.88.156 

      客户端主机地址:192.168.88.156 

服务器主机安装执行

yum install –y rsync

vim /etc/rsyncd.conf

# /etc/rsyncd: configuration file for rsync daemon mode

# See rsyncd.conf man page for more options.

# configuration example:

# uid = rsync
# gid = rsync
# use chroot = no
# max connections = 200
# pid file = /var/run/rsyncd.pid
# exclude = lost+found/
# transfer logging = yes
# timeout = 900
# ignore nonreadable = yes
# dont compress   = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2

# [ftp]
#        path = /home/ftp
#        comment = ftp export area
#rsync_config
#rsync_config
##rsyncd.conf start##
uid = rsync
gid = rsync
use chroot = no
max connections =200
timeout = 300
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
ignore errors
read only = false
list = false
hosts allow = 192.168.88.0/24
hosts deny = 0.0.0.0/32
auth users = rsync_backup
secrets file = /etc/rsync.password
[backup]
comment = "backup dir by rync"
path = /backup




mkdir -p backup
useradd rsync -s /sbin/nologin -M
chown -R rsync.rsync backup/
echo "rsync_backup:123456" >/etc/rsync.password
chmod 600 /etc/rsync.password
rsync --daemon
netstat -lntup |grep rsync

客户机安装

yum install –y rsync
echo "rsync_backup:123456" >/etc/rsync.password
netstat -lntup |grep rsync
发布了213 篇原创文章 · 获赞 508 · 访问量 80万+

猜你喜欢

转载自blog.csdn.net/xufengduo/article/details/103522451
今日推荐