ubuntu下配置rsync服務

來源:互聯網
上載者:User

ubuntu下配置rsync服務 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[編輯]配置1. 編輯/etc/default/rsync 啟動rsync作為使用xinetd的守護進程$ sudo vim /etc/default/rsync  RSYNC_ENABLE=inetd2. 建立 /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.secrets4. 建立 /etc/rsyncd.secrets  配置使用者名稱和密碼.$ sudo vim /etc/rsyncd.secrets   user:password4.a$ sudo chmod 600 /etc/rsyncd.secrets5. 啟動/重啟 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 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.