<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## 項目背景 [ansible部署][2] 代碼發布到master上,slave周期性從master同步代碼。 在此種方式下,沒辦法做到代碼實時更新。 ![](http://om4h63cja.bkt.clouddn.com/17-5-13/16108068-file_1494663056132_ba17.png) ## master和slave安裝rsync ### yum安裝 ~~~ yum install -y rsync ~~~ 也可以在擴展源epel-self中直接安裝 **rsync-enhanced** ### 編譯安裝 [下載][1] ~~~ ./configure && make && make install ~~~ ## master配置 ### 配置文件 /etc/rsyncd.conf ~~~ # 全局設置 strict mood = yes # 是否檢查secrete文件權限,若其他人可讀,則無法同步 port = 873 # 默認開的端口 uid = root # 用戶 gid = root # 用戶組 use chroot = no # 不允許改變程序執行時所參考的根目錄位置 max connections = 4 # 最大連接數 pid file = /var/run/rsyncd.pid # pid文件路徑 lock file = /var/rsyncd.lock # look文件路徑 log file = /var/log/rsyncd.log # 日志文件路徑 transfer logging = yes # 開啟傳輸日志 timeout = 900 # 連接超時時間 ignore nonreadable = yes # 忽略不可讀的文件 ignore errors # I/O錯誤時,不刪除目標文件 dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 # 項目設置 [test] common = # 同步描述 path = /alidata/www/default # 源文件路徑 read only = yes # yes不允許上傳 write only = no # no允許下載 list = no hosts allow = 10.161.140.46 # 允許客戶端地址 auth users = root # 客戶端用戶 secrets file = /etc/rsyncd.password # 客戶端密碼文件 ~~~ ### 編輯密碼文件,并修改權限 ~~~ # vim /etc/rsyncd.password root:123456 # chmod 600 /etc/rsyncd.password ~~~ ### 開啟rsync服務 #### 以daemon方式運行 >[info]若文件傳輸比較頻繁,推薦使用daemon方式 ~~~ /usr/bin/rsync --daemon --config=/etc/rsyncd.conf 或者 systemctl start rsyncd ~~~ 開機自啟 ~~~ echo "/usr/bin/rsync --daemon --config=/etc/rsyncd.conf" >> /etc/rc.local ~~~ #### 使用超級守護進程運行 ~~~ yum install -y xinetd ~~~ 開機自啟 ~~~ chkconfig --add xinetd chkconfig xinetd on ~~~ 開啟rsync ~~~ vim /etc/xinetd.d/rsync disable = no ~~~ --- ## slave配置 ### 添加密碼文件,并修改權限 ~~~ # vim /etc/rsyncd.password 123456 # chmod 600 /etc/rsyncd.password ~~~ ### 同步文件參數 ~~~ /usr/bin/rsync -avrP --delete --progress --exclude=Runtime --password-file=/etc/rsyncd.password root@10.171.239.5::test /dest ~~~ ### 設置任務計劃 ~~~ 0 */2 * * * /usr/bin/rsync -avrP --delete --exclude=Runtime --password-file=/etc/rsyncd.password root@10.171.239.5::test /dest ~~~ [1]: https://rsync.samba.org/ [2]:https://coding.net/u/echohiyang/p/playbook/git/tree/master/rsync_y
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看