第一部分 rsync服务端配置
1、下载安装
a、 yum安装。 yum install rsync
b、 下载rsync安装文件安装
#tar zxvf rsync-2.6.9.tar.gz
#cd rsync-2.6.9
#./configure --prefix=/usr/local/rsync
#make
#make install
2、 开启rsync服务
a、启动rsync
#vi /etc/xinetd.d/rsync
# default: off # description: The rsync server is a good addition to an ftp server, as it # allows crc checksumming etc. service rsync { disable = no flags = IPv6 socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID }
b、手动生成配置文件 /etc/rsyncd.conf
###########----全局配置-----############# #pid file = /var/run/rsyncd.pid #pid文件,可无 port = 873 #监听端口 uid = root # 运行rsync守护进程的用户名 gid = root # 运行rsync守护进程的用户组 use chroot = yes read only = no hosts allow = 127.0.0.1/24 172.18.0.0/16 #允许访问的ip,可不填写,安全起见需要填写 hosts deney = 183.232.24.190 #拒绝访问ip,可不填写 ###########----模块配置-----############# [sinawap] path = /usr/local/test read only = no list = no #不允许列文件 auth users = username #可不填写 secrets file = /etc/rsync.pas #如果有用户,可填写密码文件地址如下 hosts allow = 127.0.0.1/24 172.18.0.0/16 #允许访问的ip,可不填写,安全起见需要填写 hosts deny = 0.0.0.0/0 #拒绝访问ip,可不填写 #transfer logging = yes
c、启动服务
a) service xinetd restart
b) 独立启动 /usr/bin/rsync --deamon
-----待续-----