{"id":5441,"date":"2020-08-18T16:27:31","date_gmt":"2020-08-18T08:27:31","guid":{"rendered":"http:\/\/39.97.231.10\/?p=5441"},"modified":"2020-08-18T16:27:31","modified_gmt":"2020-08-18T08:27:31","slug":"sersync%e5%ae%9e%e7%8e%b0%e6%95%b0%e6%8d%ae%e5%ae%9e%e6%97%b6%e5%90%8c%e6%ad%a5","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=5441","title":{"rendered":"sersync\u5b9e\u73b0\u6570\u636e\u5b9e\u65f6\u540c\u6b65"},"content":{"rendered":"<header class=\\\"entry-header\\\"><\/header>\n<div class=\\\"entry-content\\\">\n<div class=\\\"begin-single-meta\\\"><span style=\\\"color: #1e73be; font-size: 1.38462rem;\\\">1.1 \u7b2c\u4e00\u4e2a\u91cc\u7a0b\u7891\uff1a\u5b89\u88c5sersync\u8f6f\u4ef6<\/span><\/div>\n<div class=\\\"single-content\\\">\n<h3><span id=\\\"111\\\">1.1.1\u00a0\u5c06\u8f6f\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u5f53\u4e2d\u5e76\u89e3\u538b<\/span><\/h3>\n<p>1\u3001\u4e0a\u4f20\u8f6f\u4ef6\u5230\u670d\u52a1\u5668\u4e0a\u00a0rz -E<\/p>\n<p>\u4e3a\u4e86\u4fbf\u4e8e\u7ba1\u7406\u4e0a\u4f20\u4f4d\u7f6e\u7edf\u4e00\u8bbe\u7f6e\u4e3a\u00a0\/server\/tools\u00a0\u4e2d<\/p>\n<p>2\u3001\u89e3\u538b\u8f6f\u4ef6\u5305<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@backup sersync_installdir_64bit]# tree\n.\n\u2514\u2500\u2500 sersync\n    \u251c\u2500\u2500 bin\n    \u2502   \u2514\u2500\u2500 sersync\n    \u251c\u2500\u2500 conf\n    \u2502   \u2514\u2500\u2500 confxml.xml\n    \u2514\u2500\u2500 logs<\/pre>\n<\/div>\n<h3><span id=\\\"112\\\">1.1.2\u00a0\u4e8c\u8fdb\u5236\u5305\u5b89\u88c5\u65b9\u6cd5<\/span><\/h3>\n<p>\u4e8c\u8fdb\u5236\u5305\u5b89\u88c5\u8f6f\u4ef6\u65b9\u6cd5\uff08\u7eff\u8272\u8f6f\u4ef6\u5b89\u88c5\u65b9\u6cd5\uff09\uff1a<\/p>\n<p>\u00a0\u76f4\u63a5\u89e3\u538b\u5c31\u53ef\u4ee5\u4f7f\u7528<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@nfs01 sersync_installdir_64bit]# mv sersync\/ \/usr\/local\/\n[root@nfs01 tools]# tree \/usr\/local\/sersync\/\n  \/usr\/local\/sersync\/\n  \u251c\u2500\u2500 bin\n  \u2502   \u2514\u2500\u2500 sersync\n  \u251c\u2500\u2500 conf\n  \u2502   \u2514\u2500\u2500 confxml.xml\n  \u2514\u2500\u2500 logs\n  3 directories, 2 files<\/pre>\n<\/div>\n<h2><span id=\\\"12_sersync\\\">1.2\u00a0\u7b2c\u4e8c\u4e2a\u91cc\u7a0b\u7891\uff1a\u7f16\u5199sersync\u914d\u7f6e\u6587\u4ef6<\/span><\/h2>\n<h3><span id=\\\"121\\\">1.2.1\u00a0\u5e38\u89c1\u7684\u8bed\u6cd5\u683c\u5f0f<\/span><\/h3>\n<div>\n<p>rsync\u00a0\u914d\u7f6e\u6587\u4ef6\u7f16\u5199\uff1aini\u8bed\u6cd5<\/p>\n<p>sersync\u914d\u7f6e\u6587\u4ef6\u7f16\u5199\uff1axml\u8bed\u6cd5<\/p>\n<p>ansible\u914d\u7f6e\u6587\u4ef6\u7f16\u5199:yml\u00a0\u8bed\u6cd5<\/p>\n<\/div>\n<h3><span id=\\\"122\\\">1.2.2\u00a0\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/span><\/h3>\n<p>\u7f16\u5199\u524d\u5907\u4efd<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@backup conf]# ll\ntotal 4\n-rw-r--r-- 1 root root 2214 Oct 26  2011 confxml.xml\n[root@backup conf]# cp confxml.xml{,.bak}<\/pre>\n<\/div>\n<p>6-11\u884c\u8868\u793a\u6392\u9664\u540c\u6b65\u7684\u6570\u636e\uff0c\u7b49\u4ef7\u4e8e\u00a0&#8211;exclude\u00a0\u529f\u80fd\uff0c\u8868\u793a\u6392\u9664<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>&lt;filter start=\\\"false\\\"&gt;\n        &lt;exclude expression=\\\"(.*)\\\\.svn\\\"&gt;exclude&gt;\n        &lt;exclude expression=\\\"(.*)\\\\.gz\\\"&gt;exclude&gt;\n        &lt;exclude expression=\\\"^info\/*\\\"&gt;exclude&gt;\n         &lt;exclude expression=\\\"^static\/*\\\"&gt;exclude&gt;\nfilter&gt;<\/pre>\n<\/div>\n<p>12-21\u884c\u662f\u5229\u7528inotify\u7684\u529f\u80fd\u76d1\u63a7\u6307\u5b9a\u7684\u4e8b\u4ef6\uff0c\u7b49\u4ef7\u4e0e\u00a0-e create\uff0cdelete\u2026\u2026\u00a0\u8868\u793a\u6307\u5b9a\u76d1\u63a7\u4e8b\u4ef6\u4fe1\u606f<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre> &lt;inotify&gt;\n     &lt;delete start=\\\"true\\\"\/&gt;\n     &lt;createFolder start=\\\"true\\\"\/&gt;\n     &lt;createFile start=\\\"false\\\"\/&gt;\n     &lt;closeWrite start=\\\"true\\\"\/&gt;\n     &lt;moveFrom start=\\\"true\\\"\/&gt;\n     &lt;moveTo start=\\\"true\\\"\/&gt;\n     &lt;attrib start=\\\"false\\\"\/&gt;\n     &lt;modify start=\\\"false\\\"\/&gt;\n inotify&gt;<\/pre>\n<\/div>\n<p>24-28\u884c\uff1a\u63a8\u9001\u5230\u54ea\u91cc\u00a0name=\u6a21\u5757\u00a0\u662frsync\u670d\u52a1\u5668\u7684\u5730\u5740<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre> &lt;localpath watch=\\\"\/data\\\"&gt; #\u76d1\u63a7\u90a3\u4e2a\u76ee\u5f55\n     &lt;remote ip=\\\"172.16.1.41\\\" name=\\\"backup\\\"\/&gt;\n localpath&gt;<\/pre>\n<\/div>\n<p>29-35\u884c\u00a0\u5b9a\u4e49rsync\u63a8\u9001\u65f6\u7684\u53c2\u6570\u4fe1\u606f\u3002<\/p>\n<p><strong>\u6ce8\u610f\uff1a\u4e0d\u8981\u6709\u5355\u8bcd\u62fc\u5199\u9519\u8bef\u00a0<\/strong><strong>\uff08true<\/strong><strong>\uff09\uff0c\u5426\u5219\u7a0b\u5e8f\u4e0d\u80fd\u6b63\u5e38\u542f\u52a8\uff0c\u5361\u6b7b<\/strong><\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>&lt;rsync&gt;\n    &lt;commonParams params=\\\"-az\\\"\/&gt;\n    &lt;auth start=\\\"true\\\" users=\\\"rsync_backup\\\" passwordfile=\\\"\/etc\/rsync.password\\\"\/&gt;\n    &lt;userDefinedPort start=\\\"false\\\" port=\\\"874\\\"\/&gt;\n    &lt;timeout start=\\\"false\\\" time=\\\"100\\\"\/&gt;\n    &lt;ssh start=\\\"false\\\"\/&gt;\nrsync&gt;<\/pre>\n<\/div>\n<p><strong>\u914d\u7f6e\u6587\u4ef6\u6700\u7ec8\u5185\u5bb9\uff1a<\/strong><\/p>\n<p>\u00a0<\/p>\n<div class=\\\"cnblogs_code\\\"><img id=\\\"code_img_closed_ee17e7d9-096c-46eb-ae44-f9495fa11f01\\\" class=\\\"code_img_closed\\\" src=\\\"https:\/\/clsn.io\/wp-content\/uploads\/2018\/03\/ContractedBlock-17.gif\\\" alt=\\\"sersync\u5b9e\u73b0\u6570\u636e\u5b9e\u65f6\u540c\u6b65\\\" \/>\n<div id=\\\"cnblogs_code_open_ee17e7d9-096c-46eb-ae44-f9495fa11f01\\\" class=\\\"cnblogs_code_hide\\\">\n<pre> 1 [root@nfs01 tools]# cat \/usr\/local\/sersync\/conf\/confxml.xml\n 2  xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-1\\\"?&gt;\n 3  &lt;head version=\\\"2.5\\\"&gt;\n 4     &lt;host hostip=\\\"localhost\\\" port=\\\"8008\\\"&gt;host&gt;\n 5     &lt;debug start=\\\"false\\\"\/&gt;\n 6     &lt;fileSystem xfs=\\\"false\\\"\/&gt;\n 7     &lt;filter start=\\\"false\\\"&gt;\n 8     &lt;exclude expression=\\\"(.*)\\\\.svn\\\"&gt;exclude&gt;\n 9     &lt;exclude expression=\\\"(.*)\\\\.gz\\\"&gt;exclude&gt;\n10     &lt;exclude expression=\\\"^info\/*\\\"&gt;exclude&gt;\n11     &lt;exclude expression=\\\"^static\/*\\\"&gt;exclude&gt;\n12     filter&gt;\n13     &lt;inotify&gt;\n14     &lt;delete start=\\\"true\\\"\/&gt;\n15     &lt;createFolder start=\\\"true\\\"\/&gt;\n16     &lt;createFile start=\\\"false\\\"\/&gt;\n17     &lt;closeWrite start=\\\"true\\\"\/&gt;\n18     &lt;moveFrom start=\\\"true\\\"\/&gt;\n19     &lt;moveTo start=\\\"true\\\"\/&gt;\n20     &lt;attrib start=\\\"false\\\"\/&gt;\n21     &lt;modify start=\\\"false\\\"\/&gt;\n22     inotify&gt;\n23\n24     &lt;sersync&gt;\n25     &lt;localpath watch=\\\"\/data\\\"&gt;\n26         &lt;remote ip=\\\"172.16.1.41\\\" name=\\\"nfsbackup\\\"\/&gt;\n27\n28\n29     localpath&gt;\n30     &lt;rsync&gt;\n31         &lt;commonParams params=\\\"-az\\\"\/&gt;\n32         &lt;auth start=\\\"true\\\" users=\\\"rsync_backup\\\" passwordfile=\\\"\/etc\/rsync.password\\\"\/&gt;\n33         &lt;userDefinedPort start=\\\"false\\\" port=\\\"874\\\"\/&gt;\n34         &lt;timeout start=\\\"false\\\" time=\\\"100\\\"\/&gt;\n35         &lt;ssh start=\\\"false\\\"\/&gt;\n36     rsync&gt;\n37     &lt;failLog path=\\\"\/tmp\/rsync_fail_log.sh\\\" timeToExecute=\\\"60\\\"\/&gt;\n38     &lt;crontab start=\\\"false\\\" schedule=\\\"600\\\"&gt;\n39         &lt;crontabfilter start=\\\"false\\\"&gt;\n40         &lt;exclude expression=\\\"*.php\\\"&gt;exclude&gt;\n41         &lt;exclude expression=\\\"info\/*\\\"&gt;exclude&gt;\n42         crontabfilter&gt;\n43     crontab&gt;\n44     &lt;plugin start=\\\"false\\\" name=\\\"command\\\"\/&gt;\n45     sersync&gt;\n46\n47     &lt;plugin name=\\\"command\\\"&gt;\n48     &lt;param prefix=\\\"\/bin\/sh\\\" suffix=\\\"\\\" ignoreError=\\\"true\\\"\/&gt;\n49     &lt;filter start=\\\"false\\\"&gt;\n50         &lt;include expression=\\\"(.*)\\\\.php\\\"\/&gt;\n51         &lt;include expression=\\\"(.*)\\\\.sh\\\"\/&gt;\n52     filter&gt;\n53     plugin&gt;\n54\n55     &lt;plugin name=\\\"socket\\\"&gt;\n56     &lt;localpath watch=\\\"\/opt\/tongbu\\\"&gt;\n57         &lt;deshost ip=\\\"192.168.138.20\\\" port=\\\"8009\\\"\/&gt;\n58     localpath&gt;\n59     plugin&gt;\n60     &lt;plugin name=\\\"refreshCDN\\\"&gt;\n61     &lt;localpath watch=\\\"\/data0\/htdocs\/cms.xoyo.com\/site\/\\\"&gt;\n62         &lt;cdninfo domainname=\\\"ccms.chinacache.com\\\" port=\\\"80\\\" username=\\\"xxxx\\\" passwd=\\\"xxxx\\\"\/&gt;\n63         &lt;sendurl base=\\\"http:\/\/pic.xoyo.com\/cms\\\"\/&gt;\n64         &lt;regexurl regex=\\\"false\\\" match=\\\"cms.xoyo.com\/site([\/a-zA-Z0-9]*).xoyo.com\/images\\\"\/&gt;\n65     localpath&gt;\n66     plugin&gt;\n67 head&gt;<\/pre>\n<\/div>\n<p><span class=\\\"cnblogs_code_collapse\\\">View Code\u00a0<strong>\u914d\u7f6e\u6587\u4ef6\u6700\u7ec8\u5185\u5bb9<\/strong><\/span><\/p>\n<\/div>\n<p>\u00a0<\/p>\n<h2><span id=\\\"13_sersync\\\">1.3\u00a0\u7b2c\u4e09\u91cc\u7a0b\u7891\uff1a\u00a0\u542f\u52a8sersync<\/span><\/h2>\n<h3><span id=\\\"131\\\">1.3.1\u00a0\u4fee\u6539\u6587\u4ef6\u7684\u6743\u9650\uff08\u53ef\u6267\u884c\uff09<\/span><\/h3>\n<p>\u9996\u5148\u8ba9\u7a0b\u5e8f\u8ba9\u6587\u4ef6\u6709\u6267\u884c\u6743\u9650<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@nfs01 bin]# chmod a+x sersync\n[root@nfs01 bin]# ll\ntotal 1768\n-rwxr-xr-x 1 root root 1810128 Oct 26  2011 sersync<\/pre>\n<\/div>\n<h3><span id=\\\"132\\\">1.3.2\u00a0\u67e5\u770b\u8f6f\u4ef6\u7684\u5e2e\u52a9\u4fe1\u606f<\/span><\/h3>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@nfs01 bin]# .\/sersync -h\nset the system param\nexecute\uff1aecho 50000000 &gt; \/proc\/sys\/fs\/inotify\/max_user_watches\nexecute\uff1aecho 327679 &gt; \/proc\/sys\/fs\/inotify\/max_queued_events\nparse the command param\n_______________________________________________________\n\u91cd\u8981\u53c2\u6570-d:\u542f\u7528\u5b88\u62a4\u8fdb\u7a0b\u6a21\u5f0f\n\u91cd\u8981\u53c2\u6570-r:\u5728\u76d1\u63a7\u524d\uff0c\u5c06\u76d1\u63a7\u76ee\u5f55\u4e0e\u8fdc\u7a0b\u4e3b\u673a\u7528rsync\u547d\u4ee4\u63a8\u9001\u4e00\u904d\n    \u53c2\u6570-n: \u6307\u5b9a\u5f00\u542f\u5b88\u62a4\u7ebf\u7a0b\u7684\u6570\u91cf\uff0c\u9ed8\u8ba4\u4e3a10\u4e2a\n\u91cd\u8981\u53c2\u6570-o:\u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\uff0c\u9ed8\u8ba4\u4f7f\u7528confxml.xml\u6587\u4ef6\n    \u53c2\u6570-m:\u5355\u72ec\u542f\u7528\u5176\u4ed6\u6a21\u5757\uff0c\u4f7f\u7528 -m refreshCDN \u5f00\u542f\u5237\u65b0CDN\u6a21\u5757\n    \u53c2\u6570-m:\u5355\u72ec\u542f\u7528\u5176\u4ed6\u6a21\u5757\uff0c\u4f7f\u7528 -m socket \u5f00\u542fsocket\u6a21\u5757\n    \u53c2\u6570-m:\u5355\u72ec\u542f\u7528\u5176\u4ed6\u6a21\u5757\uff0c\u4f7f\u7528 -m http \u5f00\u542fhttp\u6a21\u5757\n\u4e0d\u52a0-m\u53c2\u6570\uff0c\u5219\u9ed8\u8ba4\u6267\u884c\u540c\u6b65\u7a0b\u5e8f\n________________________________________________________________<\/pre>\n<\/div>\n<h3><span id=\\\"133_bin\\\">1.3.3\u00a0\u5728\u7a0b\u5e8f\u7684bin\u76ee\u5f55\u4e0b\u542f\u52a8\u7a0b\u5e8f<\/span><\/h3>\n<div class=\\\"cnblogs_code\\\">\n<pre>.\/sersync -dro \/usr\/local\/sersync\/conf\/confxml.xml<\/pre>\n<\/div>\n<h3><span id=\\\"134\\\">1.3.4\u00a0\u542f\u52a8\u65b9\u6cd5\u4e8c<\/span><\/h3>\n<p>\u5c06\/usr\/local\/sersync\/bin\/\u7a0b\u5e8f\u7684bin\u76ee\u5f55\u6dfb\u52a0\u5230PATH\u4e2d<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>export PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/root\/bin:\/usr\/local\/sersync\/bin\/<\/pre>\n<\/div>\n<p>\u7136\u540esersync\u547d\u4ee4\u5c31\u80fd\u76f4\u63a5\u4f7f\u7528<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@nfs01 scripts]# sersync -dro \/usr\/local\/sersync\/conf\/confxml.xml\nset the system param\nexecute\uff1aecho 50000000 &gt; \/proc\/sys\/fs\/inotify\/max_user_watches\nexecute\uff1aecho 327679 &gt; \/proc\/sys\/fs\/inotify\/max_queued_events\nparse the command param\noption: -d     run as a daemon\noption: -r     rsync all the local files to the remote servers before the sersync work\noption: -o     config xml name\uff1a  \/usr\/local\/sersync\/conf\/confxml.xml\ndaemon thread num: 10\nparse xml config file\nhost ip : localhost    host port: 8008\ndaemon start\uff0csersync run behind the console\nuse rsync password-file :\nuser is    rsync_backup\npasswordfile is     \/etc\/rsync.password\nconfig xml parse success\nplease set \/etc\/rsyncd.conf max connections=0 Manually\nsersync working thread 12  = 1(primary thread) + 1(fail retry thread) + 10(daemon sub threads)\nMax threads numbers is: 22 = 12(Thread pool nums) + 10(Sub threads)\nplease according your cpu \uff0cuse -n param to adjust the cpu rate\n------------------------------------------\nrsync the directory recursivly to the remote servers once\nworking please wait...\nexecute command: cd \/data &amp;&amp; rsync -az -R --delete .\/ rsync_backup@172.16.1.41::nfsbackup --password-file=\/etc\/rsync.password &gt;\/dev\/null 2&gt;&amp;1\nrun the sersync:\nwatch path is: \/data<\/pre>\n<\/div>\n<h2><span id=\\\"14_Inotify_sersync\\\">1.4 Inotify\u4e0e\u00a0sersync\u603b\u7ed3\u5bf9\u6bd4<\/span><\/h2>\n<h3><span id=\\\"141_Inotify\\\">1.4.1 Inotify\u5b9e\u65f6\u5e76\u53d1\uff1a<\/span><\/h3>\n<p>\u3000\u3000\u7ed3\u8bba\uff1a\u7ecf\u8fc7\u6d4b\u8bd5\uff0c\u6bcf\u79d2200\u6587\u4ef6\u5e76\u53d1\uff0c\u6570\u636e\u540c\u6b65\u51e0\u4e4e\u65e0\u5ef6\u8fdf\uff08\u5c0f\u4e8e1\u79d2\uff09<\/p>\n<h3><span id=\\\"142_inotify\\\">1.4.2 inotify\u00a0\u4f18\u70b9\uff1a<\/span><\/h3>\n<p>\u3000\u30001\uff09\u76d1\u63a7\u6587\u4ef6\u7cfb\u7edf\u4e8b\u4ef6\u53d8\u5316\uff0c\u901a\u8fc7\u540c\u6b65\u5de5\u5177\u5b9e\u73b0\u5b9e\u65f6\u6570\u636e\u540c\u6b65\u3002<\/p>\n<h3><span id=\\\"143_inotify\\\">1.4.3 inotify\u00a0\u7f3a\u70b9<\/span><\/h3>\n<p>\u3000\u30001\uff09\u5e76\u53d1\u5982\u679c\u5927\u4e8e200\u4e2a\u6587\u4ef6\uff0810-100k\uff09\uff0c\u540c\u6b65\u5c31\u4f1a\u6709\u5ef6\u8fdf<\/p>\n<p>\u3000\u30002\uff09\u6211\u4eec\u524d\u9762\u5199\u7684\u811a\u672c\uff0c\u6bcf\u6b21\u90fd\u662f\u5168\u90e8\u63a8\u9001\u4e00\u6b21\uff0c\u4f46\u786e\u5b9e\u662f\u589e\u91cf\u7684\u3002\u4e5f\u53ef\u4ee5\u53ea\u540c\u6b65\u53d8\u5316\u7684\u6587\u4ef6\uff0c\u4e0d\u53d8\u5316\u7684\u4e0d\u7406\u3002<\/p>\n<p>\u3000\u30003\uff09\u76d1\u63a7\u5230\u4e8b\u4ef6\u540e\uff0c\u8c03\u7528rsync\u540c\u6b65\u662f\u5355\u8fdb\u7a0b\u7684\uff0c\u800csersync\u4e3a\u591a\u8fdb\u7a0b\u540c\u6b65\u3002\u65e2\u7136\u6709\u4e86inotify-tools\uff0c\u4e3a\u4ec0\u4e48\u8fd8\u8981\u5f00\u53d1sersync\uff1f<\/p>\n<h3><span id=\\\"144_serysyncinotifyrsync\\\">1.4.4 serysync\u529f\u80fd\u591a\uff1a\uff08inotify+rsync\u547d\u4ee4\uff09<\/span><\/h3>\n<p>\u3000\u30001\uff09\u652f\u6301\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u7ba1\u7406<\/p>\n<p>\u3000\u30002\uff09\u771f\u6b63\u7684\u5b88\u62a4\u8fdb\u7a0bsocket<\/p>\n<p>\u3000\u30003\uff09\u53ef\u4ee5\u5bf9\u5931\u8d25\u6587\u4ef6\u5b9a\u65f6\u91cd\u4f20\uff08\u5b9a\u65f6\u4efb\u52a1\u529f\u80fd\uff09<\/p>\n<p>\u3000\u30004\uff09\u7b2c\u4e09\u65b9\u7684HTTP\u63a5\u53e3\uff08\u4f8b\u5982\uff1a\u66f4\u65b0cdn\u7f13\u5b58\uff09<\/p>\n<p>\u3000\u30005\uff09\u9ed8\u8ba4\u591a\u8fdb\u7a0brsync\u540c\u6b65<\/p>\n<h3><span id=\\\"145\\\">1.4.5\u00a0\u9ad8\u5e76\u53d1\u6570\u636e\u5b9e\u65f6\u540c\u6b65\u65b9\u6848\u5c0f\u7ed3\uff1a<\/span><\/h3>\n<p>\u3000\u30001\uff09inotify\uff08sersync\uff09+ rsync\uff0c\u662f\u6587\u4ef6\u7ea7\u522b\u7684\u3002<\/p>\n<p>\u3000\u30002\uff09drbd\u6587\u4ef6\u7cfb\u7edf\u7ea7\u522b\uff0c\u6587\u4ef6\u7cfb\u7edf\u7ea7\u522b\uff0c\u57fa\u4e8eblock\u5757\u540c\u6b65\uff0c\u7f3a\u70b9\uff1a\u5907\u8282\u70b9\u6570\u636e\u4e0d\u53ef\u7528<\/p>\n<p>\u3000\u30003\uff09\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u7684\u540c\u6b65\u529f\u80fd\uff1amysql\u540c\u6b65\uff08\u4e3b\u4ece\u590d\u5236\uff09\uff0coracle\uff0cmongodb<\/p>\n<p>\u3000\u30004\uff09\u7a0b\u5e8f\u53cc\u5199\uff0c\u76f4\u63a5\u5199\u4e24\u53f0\u670d\u52a1\u5668\u3002<\/p>\n<p>\u3000\u30005\uff09\u5229\u7528\u4ea7\u54c1\u4e1a\u52a1\u903b\u8f91\u89e3\u51b3\uff08\u8bfb\u5199\u5206\u79bb\uff0c\u5907\u4efd\u8bfb\u4e0d\u5230\uff0c\u8bfb\u4e3b\uff09<\/p>\n<p><img src=\\\"https:\/\/clsn.io\/wp-content\/uploads\/2018\/03\/1190037-20171211133050009-1874384718.png\\\" alt=\\\"sersync\u5b9e\u73b0\u6570\u636e\u5b9e\u65f6\u540c\u6b65\\\" data-original=\\\"https:\/\/clsn.io\/wp-content\/uploads\/2018\/03\/1190037-20171211133050009-1874384718.png\\\" \/><\/p>\n<h2><span id=\\\"21_man\\\">2.1 man\u547d\u4ee4\u7684\u7ea7\u522b<\/span><\/h2>\n<p>centos6<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@nfs01 ~]# man man\n       The standard sections of the manual include:\n       1      User Commands                                 #\u7528\u6237\u547d\u4ee4\n       2      System Calls                                  #\u7cfb\u7edf\u8c03\u7528\n       3      C Library Functions                          # \u00c7\u5e93\u51fd\u6570\n       4      Devices and Special Files                   #\u8bbe\u5907\u548c\u7279\u6b8a\u6587\u4ef6\n       5      File Formats and Conventions                #\u6587\u4ef6\u683c\u5f0f\u548c\u7ea6\u5b9a\n       6      Games et. Al.                                  #\u6e38\u620f\u7b49\u3002\n       7      Miscellanea                                     #\u6742\u8bb0\n       8      System Administration tools and Daemons   #\u7cfb\u7edf\u7ba1\u7406\u5de5\u5177\u548c\u7a0b\u5e8f\n       Distributions  customize  the  manual section to their specifics,\n       which often include additional sections.<\/pre>\n<\/div>\n<p>centos7<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>[root@clsn tuichu]# man ~\n1   Executable programs or shell commands\n2   System calls (functions provided by the kernel)\n3   Library calls (functions within program libraries)\n4   Special files (usually found in \/dev)\n5   File formats and conventions eg \/etc\/passwd\n6   Games\n7   Miscellaneous  (including  macro  packages  and conventions), e.g.\n    man(7), groff(7)\n8   System administration commands (usually only for root)\n9   Kernel routines [Non standard]<\/pre>\n<\/div>\n<\/div>\n<\/div>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.1 \u7b2c\u4e00\u4e2a\u91cc\u7a0b\u7891\uff1a\u5b89\u88c5sersync\u8f6f\u4ef6 1.1.1\u00a0\u5c06\u8f6f\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u5f53\u4e2d\u5e76\u89e3\u538b 1\u3001\u4e0a\u4f20\u8f6f\u4ef6\u5230\u670d\u52a1\u5668\u4e0a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=5441\"> <span class=\"screen-reader-text\">sersync\u5b9e\u73b0\u6570\u636e\u5b9e\u65f6\u540c\u6b65<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[102,124],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":2,"uagb_excerpt":"1.1 \u7b2c\u4e00\u4e2a\u91cc\u7a0b\u7891\uff1a\u5b89\u88c5sersync\u8f6f\u4ef6 1.1.1\u00a0\u5c06\u8f6f\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u5f53\u4e2d\u5e76\u89e3\u538b 1\u3001\u4e0a\u4f20\u8f6f\u4ef6\u5230\u670d\u52a1\u5668\u4e0a&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5441"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5441"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5441\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5441"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}