rsync配置安裝,rsync配置

來源:互聯網
上載者:User

rsync配置安裝,rsync配置

rsync安裝

1.將rsync包解壓,包連結: https://pan.baidu.com/s/1jHPosXC 密碼: maay2.進入rsync安裝包運行命令:./configure --prefix=/usrmakemake install3.進入/etc目錄建立rsync目錄mkdir rsync4.進入/etc/rsync目錄建立3個設定檔rsyncd.conf    //設定檔rsyncd.pas     //密碼檔案rsyncd.motd    //說明檔案5.rsyncd.conf設定檔選項:log file = /usr/local/rsync/var/rsyncd.logpid file = /usr/local/rsync/var/rsyncd.pidlock file = /usr/local//etc/rsyncd.locksecrets file = /etc/rsync/rsyncd.pas   //密碼檔案motd file = /etc/rsync/rsyncd.motd     //歡迎語port = 873    //連接埠號碼read only = nohosts allow = 000.000.000.000 000.000.000.000     //允許同步的ip地址,多個用空格相隔list = yesuid = nobodygid = nobodyuse chroot = nomax connections = 4exclude = /bak/not            //要忽略的檔案目錄[bak]                         //模組名path = /home/bak              //需要同步的檔案目錄comment = www bak             //註解auth users = test             //使用者名稱5.建立rsyncd.pastest:123456      //使用者名稱:密碼6.建立rsyncd.motd+++++++++++++++++++++++++++++++++++++++++++++++++++                    welcome                     +++++++++++++++++++++++++++++++++++++++++++++++++++用戶端安裝rsync可相同步驟啟動rsync:   /usr/bin/rsync --daemon  --config=/etc/rsyncd.conf同步命令: rsync -av /home/bak test@000.000.000.000::bak運行此命令後,會提示輸入密碼,密碼為不可見狀態,輸入完成按斷行符號同步命令2:rsync -av /home/bak test@000.000.000.000::bak --password-file=/etc/rsync/auth.pas此命令可省去輸入密碼步驟,在/etc/rsync/下建立auth.pas檔案,將rsyncd.pss使用者密碼輸入123456,只需要輸入密碼XXXX,儲存上面建立的所有密碼檔案都需要600許可權chown root.root rsyncd.pas/auth.paschmod 600 rsyncd.pas/auth.pas開啟連接埠873iptables -I INPUT -p tcp --dport 873-j ACCEPT如果提示failed to create pid file /usr/local/rsync/var/rsyncd.pid: No such file or directory進入/usr/local目錄建立rsync/var目錄

  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.