ubuntu下配置rsync服务
2014-04-03 16:53
323 查看
1.新建/etc/rsyncd.conf
内容
motd file = /etc/rsyncd.motd
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log
[workspace]
path = /home/username/workspace
comment = Test
uid = username
gid = username
read only = false
auth users = username
secrets file = /etc/rsyncd.scrt
transfer logging = yes
[w]
path = /home/xx/rsync
comment = Test
ignore errors=yes
list=false
read only=no
transfer logging=yes
hosts allow=127.0.0.1
注:实际使用中username必须是ubuntu用户
2.新建/etc/rsyncd.scrt 密码文件
username:whatever_password_you_want
3.新增/etc/rsyncd.motd 欢迎词文件
Welcome to my rsync server!
4.重起rsyncd服务
/etc/init.d/rsync restart
5.客户端同步指令
rsync -vr /home/username/test username@ip::workspace
在UBUNTU下安装RSYNC通过以下步骤可以实现:
1. 编辑/etc/default/rsync 启动rsync作为使用xinetd的守护进程
2. 创建 /etc/xinetd.d/rsync 通过xinetd使rsync开始工作
3. 创建 /etc/rsyncd.conf 配置rsync使其在.
4. 创建 /etc/rsyncd.secrets 配置用户名和密码.
4.a
5. 启动/重启 xinetd
运行下面的命令检查,确认rsync配置成功。
要修改/etc/default/rsync文件,允许 --daemon 启动:RSYNC_ENABLE=false改为RSYNC_ENABLE=true 否则在启动时报错:# /etc/init.d/rsync startrsync daemon not enabled in /etc/default/rsync, not starting... ... (warning).
内容
motd file = /etc/rsyncd.motd
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log
[workspace]
path = /home/username/workspace
comment = Test
uid = username
gid = username
read only = false
auth users = username
secrets file = /etc/rsyncd.scrt
transfer logging = yes
[w]
path = /home/xx/rsync
comment = Test
ignore errors=yes
list=false
read only=no
transfer logging=yes
hosts allow=127.0.0.1
注:实际使用中username必须是ubuntu用户
2.新建/etc/rsyncd.scrt 密码文件
username:whatever_password_you_want
3.新增/etc/rsyncd.motd 欢迎词文件
Welcome to my rsync server!
4.重起rsyncd服务
/etc/init.d/rsync restart
5.客户端同步指令
rsync -vr /home/username/test username@ip::workspace
安装
在UBUNTU下安装RSYNC通过以下步骤可以实现:$ sudo apt-get install rsync xinetd
[编辑]配置
1. 编辑/etc/default/rsync 启动rsync作为使用xinetd的守护进程$ sudo vim /etc/default/rsync RSYNC_ENABLE=inetd
2. 创建 /etc/xinetd.d/rsync 通过xinetd使rsync开始工作
$ sudo vim /etc/xinetd.d/rsync service rsync { disable = no socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID }
3. 创建 /etc/rsyncd.conf 配置rsync使其在.
$ sudo vim /etc/rsyncd.conf max connections = 2 log file = /var/log/rsync.log timeout = 300 [share] comment = Public Share path = /home/share read only = no list = yes uid = nobody gid = nogroup auth users = user secrets file = /etc/rsyncd.secrets
4. 创建 /etc/rsyncd.secrets 配置用户名和密码.
$ sudo vim /etc/rsyncd.secrets user:password
4.a
$ sudo chmod 600 /etc/rsyncd.secrets
5. 启动/重启 xinetd
$ sudo /etc/init.d/xinetd restart
[编辑]测试
运行下面的命令检查,确认rsync配置成功。$ sudo rsync user@192.168.0.1::share Password: drwxr-xr-x 4096 2006/12/13 09:41:59 . drwxr-xr-x 4096 2006/11/23 18:00:03 folders
要修改/etc/default/rsync文件,允许 --daemon 启动:RSYNC_ENABLE=false改为RSYNC_ENABLE=true 否则在启动时报错:# /etc/init.d/rsync startrsync daemon not enabled in /etc/default/rsync, not starting... ... (warning).
相关文章推荐
- Ubuntu 下配置Rsync服务的方法
- Ubuntu下多服务器 Rsync同步镜像服务配置
- ubuntu 11.10 rsync 服务配置
- Ubuntu下配置Rsync服务
- ubuntu下配置rsync服务
- Ubuntu系统下配置Rsync服务
- Ubuntu下多服务器 Rsync同步镜像服务配置
- Ubuntu下多服务器 Rsync同步镜像服务配置
- 配置ubuntu开机自动启动samba服务命令
- Ubuntu10.04配置Ssh服务
- ubuntu配置邮件服务
- rsync服务安装和配置
- Ubuntu10 samba 服务配置
- ubuntu smaba服务配置
- Ubuntu14.04中配置Samba服务
- ubuntu14.04kylin-desktop64配置ssh服务
- rsync同步服务安装配置及脚本使用
- 【Linux】Ubuntu配置服务自启动 sysv-rc-conf
- Ubuntu 16.04安装配置Samba服务
- ubuntu下ssh server服务配置