日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

rsync同步服务部署

發布時間:2025/3/15 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 rsync同步服务部署 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#!/bin/bash #rsync?no?system?user #xinetd?rsync(873) #server #/root/ #讀取文件記錄集 function?ReadLine() {cat?$1?|?while?read?linedoif?[?"$2"?=?"$line"?];?thenreturn?1elseresult=0fidonereturn?$result }rpm?-ivh?xinetd-2.3.14-39.el6_4.x86_64.rpm rpm?-ivh?rsync-3.0.6-9.el6_4.1.x86_64.rpmsed?-i?"6c?disable?=?no"?/etc/xinetd.d/rsync chkconfig?xinetd?on /etc/init.d/xinetd?startrsyncConf=/etc/rsyncd.conf rsyncArray=( "uid?=?nobody"????????????????????????? "gid?=?nobody"??????????????????????????? "address?=192.168.2.63"????#rsync服務主機IP??????????????????? "port?=873"??????????????????????????????? "hosts?allow?=192.168.2.64"????#允許同步的服務器主機IP???????????????????? "use?chroot?=?yes"??????????????????????????????? "max?connections?=5"????????????????????????????? "pid?file?=/var/run/rsyncd.pid"???????? "lock?file?=/var/run/rsync.lock"????????? "log?file?=/var/log/rsyncd.log"?????????? "motd?file?=/etc/rsyncd.motd" "[wwwroot]"???????????? "path?=/var/www/html"??????????????????????? "comment?=?used?for?web-data?root"???? "read?only?=?yes"????????????????????????????????? "list?=?yes"????????????????????????????????????????? "auth?users?=?rsyncuser"?????????#虛擬用戶名??????????????? "secrets?file?=/etc/rsync.passwd"???????? )[?-f?/etc/rsyncd.conf?] if?[?$??-eq?0?];thenexit?0 elsetouch?$rsyncConf fifor?((i?=?0;?i?<?${#rsyncArray[@]};?i++)) doReadLine?$rsyncConf?"${rsyncArray[$i]}"if?[?$??=?0?];?thenecho?${rsyncArray[$i]}?>>?$rsyncConffi doneecho?"Welcome?to?Backup?Server"?>?/etc/rsyncd.motd?#登錄提示信息自行更改 echo?"rsyncuser:123"?>>?/etc/rsync.passwd?#賬戶密碼自行更改 chmod?600?/etc/rsync.passwd /etc/init.d/xinetd?restart


轉載于:https://blog.51cto.com/heyangguang/1894553

總結

以上是生活随笔為你收集整理的rsync同步服务部署的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。