<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; Inotify</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/inotify/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Wed, 01 Apr 2026 08:27:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux下用inotify-tool实时监控服务器文件</title>
		<link>https://www.osyunwei.com/archives/9023.html</link>
		<comments>https://www.osyunwei.com/archives/9023.html#comments</comments>
		<pubDate>Fri, 24 Apr 2015 02:06:47 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9023</guid>
		<description><![CDATA[说明： 服务器系统：CentOS 文件目录：/home/web/osyunwei.com 实现目的： 当/home/web/osyunwei.com下面除过cache目录之外，任何文件发生变化时，记录日志并保存。 具体操作： 一、安装Inotify-tools工具 1、查看服务器内核是否支持inotify ll /proc/sys/fs/inotify #列出文件目录，出现下面的内容，说明服务器内核支持inotify -rw-r--r-- 1 root root 0 Mar 7 02:17 max_queued_events -rw-r--r-- 1 root root 0 Mar 7 02:17 max_user_instances -rw-r--r-- 1 root root 0 Mar 7 02:17 max_user_watches 备注：Linux下支持inotify的内核最小为2.6.13，可以输入命令：uname -a查看内核 CentOS 5.X 内核为2.6.18，默认已经支持inotify 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 2、安装inotify-tools yum install make gcc gcc-c++ #安装编译工具 inotify-tools下载地址：http://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz 上传inotify-tools-3.14.tar.gz到/usr/local/src目录下 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9023.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9023.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下Rsync+sersync实现数据实时同步</title>
		<link>https://www.osyunwei.com/archives/7447.html</link>
		<comments>https://www.osyunwei.com/archives/7447.html#comments</comments>
		<pubDate>Tue, 11 Mar 2014 02:27:02 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[sersync]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7447</guid>
		<description><![CDATA[前言： 一、为什么要用Rsync+sersync架构? 1、sersync是基于Inotify开发的，类似于Inotify-tools的工具 2、sersync可以记录下被监听目录中发生变化的（包括增加、删除、修改）具体某一个文件或某一个目录的名字，然后使用rsync同步的时候，只同步发生变化的这个文件或者这个目录。 二、Rsync+Inotify-tools与Rsync+sersync这两种架构有什么区别？ 1、Rsync+Inotify-tools （1）：Inotify-tools只能记录下被监听的目录发生了变化（包括增加、删除、修改），并没有把具体是哪个文件或者哪个目录发生了变化记录下来； （2）：rsync在同步的时候，并不知道具体是哪个文件或者哪个目录发生了变化，每次都是对整个目录进行同步，当数据量很大时，整个目录同步非常耗时（rsync要对整个目录遍历查找对比文件），因此，效率很低。 2、Rsync+sersync （1）：sersync可以记录下被监听目录中发生变化的（包括增加、删除、修改）具体某一个文件或某一个目录的名字； （2）：rsync在同步的时候，只同步发生变化的这个文件或者这个目录（每次发生变化的数据相对整个同步目录数据来说是很小的，rsync在遍历查找比对文件时，速度很快），因此，效率很高。 小结：当同步的目录数据量不大时，建议使用Rsync+Inotify-tools；当数据量很大（几百G甚至1T以上）、文件很多时，建议使用Rsync+sersync。 说明： 操作系统：CentOS 5.X 源服务器：192.168.21.129 目标服务器：192.168.21.127，192.168.21.128 目的：把源服务器上/home/www.osyunwei.com目录实时同步到目标服务器的/home/www.osyunwei.com下 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 具体操作： 第一部分：分别在两台目标服务器192.168.21.127，192.168.21.128上操作 一、分别在两台在目标服务器安装Rsync服务端 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存，退出 setenforce 0 #立即生效 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7447.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7447.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux下Rsync+Inotify-tools实现数据实时同步</title>
		<link>https://www.osyunwei.com/archives/7435.html</link>
		<comments>https://www.osyunwei.com/archives/7435.html#comments</comments>
		<pubDate>Fri, 07 Mar 2014 06:51:51 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Rsync]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7435</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.X 源服务器：192.168.21.129 目标服务器：192.168.21.127，192.168.21.128 目的：把源服务器上/home/www.osyunwei.com目录实时同步到目标服务器的/home/www.osyunwei.com下 具体操作： 第一部分：分别在两台目标服务器192.168.21.127，192.168.21.128上操作 一、分别在两台在目标服务器安装Rsync服务端 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存，退出 setenforce 0  #立即生效 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT :wq! #保存，退出 /etc/init.d/iptables restart #最后重启防火墙使配置生效 3、安装Rsync服务端软件 yum install rsync xinetd #安装 vi [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7435.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7435.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
