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
注:實際使用中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
$ sudo vim /etc/default/rsync2. 建立 /etc/xinetd.d/rsync 通過xinetd使rsync開始工作rsync_enable=inetd
$ sudo vim /etc/xinetd.d/rsync3. 建立 /etc/rsyncd.conf 配置rsync使其在.service rsync
$ sudo vim /etc/rsyncd.conf4. 建立 /etc/rsyncd.secrets 配置使用者名稱和密碼.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
$ sudo vim /etc/rsyncd.secrets4.auser:password
$ sudo chmod 600 /etc/rsyncd.secrets5. 啟動/重啟 xinetd
$ sudo /etc/init.d/xinetd restart執行下面的命令檢查,確認rsync配置成功。
$ sudo rsync [email protected]::sharepassword:
drwxr-xr-x 4096 2006/12/13 09:41:59 .
drwxr-xr-x 4096 2006/11/23 18:00:03 folders
debian下rsync配置過程
一 特性簡介 rsync是類unix系統下的資料映象備份工具,從軟體的命名上就可以看出來了 remote sync。它的特性如下 1 可以映象儲存整個目錄樹和檔案系統。2 可以很容易做到保持原來檔案的許可權 時間 軟硬鏈結等等。3 無須特殊許可權即可安裝。4 優化的流程,檔案傳輸效率高。5 可以使用...
ubuntu下安裝proftpd FTP伺服器總結
公司想做一台ftp伺服器是公司的人員共享檔案,考慮到安全問題選擇linux下做並且每個使用者的許可權不同,網上找到proftpd符合要求 一 安裝 在此過程中會讓選擇行模式 standalone和inetd,前者是單一伺服器模式,後者是超級伺服器模式 sudo apt get install pro...
Macbook Pro下配置Apache伺服器
在finder裡面,建立資料夾 sites 完整路徑 users michaelzhang sites 備份 etc apache2 下的httpd.cof 修改 etc apache2 httpd.conf,如下。原始 michaels macbook pro apache2 michaelzha...