server:192.168.26.130
rpm -qa |grep rsync #检查系统是否安装了rsync软件包
rsync-2.6.8-3.1
rpm -ivh rsync-2.6.8-3.1.i386.rpm # 如果没有安装则手动安装
vim /etc/xinetd.d/rsync
1 配置rsync server
将disable=yes改为no
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
2 配置rsync自动启动
[root@test etc]# chkconfig rsync on
[root@test etc]# chkconfig rsync --list
rsync on
vi /etc/rsyncd.conf
3.运行rsync
/usr/local/bin/rsync --daemon
验证启动是否成功:
netstat -na|grep 873
secrets file = /etc/rsyncd.secrets
read only = no
list = yes
uid = root
gid = root
use chroot = no
#max connections = 5
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
[web]
comment = web 's directory
path = /home/test/software
auth users = rsync
echo "rsync:rsync" >> /etc/rsyncd.secrets
chmod 600 /etc/rsyncd.secrets
clinet:192.168.26.128
echo "rsync" >> /etc/rsyncd.secrets
rsync -av /root/test/ --password-file=/etc/rsyncd.secrets
阅读(2281) | 评论(0) | 转发(0) |