<?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>haohtml&#039;s blog &#187; Windows</title>
	<atom:link href="http://blog.haohtml.com/index.php/tag/windows/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.haohtml.com</link>
	<description>haohtml&#039;s life and works blog</description>
	<lastBuildDate>Sat, 31 Jul 2010 10:45:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Windows 2003上网络负载均衡的实现</title>
		<link>http://blog.haohtml.com/index.php/archives/3826</link>
		<comments>http://blog.haohtml.com/index.php/archives/3826#comments</comments>
		<pubDate>Mon, 07 Jun 2010 06:42:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[负载均衡]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=3826</guid>
		<description><![CDATA[以前一直研究的都是基于Linux/FreeBSD下的负载均衡架构，在我另外一篇负载均衡文章里面专门提到过相关的内容，今天无意中看到一篇文章 谈到在window 2003 server上实现负载均衡，这还是第一次看到，实现的方式类似Linux的LVS软件方式，之前在Windows 2000和XP中都没有类似的功能，感觉挺有意思，搜集过来大家分享。 [原文如下] 在现行的许多网络应用中，有时一台服务器往往不能满足客户端的要求，此时只能通过增加服务器来解决问题。 那么，有没有一个办法或者技术来解决此类问题呢?使用Windows 2000或Windows Server 2003中的网络负载平衡群集就可以（本文将介绍Windows Server 2003中的网络负载平衡技术的实现方法）。 一、网络负载平衡的优点 1.网络负载平衡允许你将传入的请求传播到最多达32台的服务器上，即可以使用最多32台服务器共同分担对外的网络请求服务。网络负载平衡技术 保证即使是在负载很重的情况下它们也能作出快速响应。 2.网络负载平衡对外只须提供一个IP地址（或域名）。 3.如果网络负载平衡中的一台或几台服务器不可用时，服务不会中断。网络负载平衡自动检测到服务器不可用时，能够迅速在剩余的服务器中重新指派 客户机通讯。此保护措施能够帮助你为关键的业务程序提供不中断的服务。可以根据网络访问量的增多来增加网络负载平衡服务器的数量。 4.网络负载平衡可在普通的计算机上实现。 在Windows Server 2003中，网络负载平衡的应用程序包括Internet信息服务(IIS)、ISA　Server 2000防火墙与代理服务器、VPN虚拟专用网、终端服务器、Windows Media Services（Windows视频点播、视频广播）等服务。同时，网络负载平衡有助于改善你的服务器性能和可伸缩性，以满足不断增长的基于 Internet客户端的需求。 网络负载平衡可以让客户端用一个逻辑Internet名称和虚拟IP地址（又称群集IP地址）访问群集，同时保留每台计算机各自的名称。 下面，我们将在两台安装Windows Server 2003的普通计算机上，介绍网络负载平衡的实现及应用。 这两台计算机中，一台计算机名称为w2003-1，IP地址为202.206.197.190，另一台名为w2003-2，IP地址为 202.206.197.191。 规划网络负载平衡群集使用的IP地址为202.206.197.195，规划网络负载平衡群集完整的计算机名称为 cluster.heinfo.edu.cn。你需要在heinfo.edu.cn域中注册此主机名称并将地址设置为202.206.197.195。如 果你没有DNS，可以在需要访问网络负载平衡的客户机（包括网络负载平衡主机）上编辑%systemroot%system32driversetc目录 下的hosts文件，添加一条信息“202.206.197.195 cluster.heinfo.edu.cn”，即可解决DNS域名解析的问题。 当正式应用时，客户机只需要使用cluster.heinfo.edu.cn或IP地址202.206.197.195来访问服务器，网络服务 平衡会根据每台服务器的负载情况自动选择202.206.197.190或者202.206.197.191对外提供服务。 网络负载平衡的实现过程如下： 在实现网络负载平衡的每一台计算机上，只能安装TCP/IP协议，不要安装任何其他的协议（如IPX协议或者NetBEUI协议），在网络属性 中，“网络负载平衡”也不能被选择，这可以从“网络连接属性”中查看。 ①先进入第一台计算机，以管理员身份登录，从“管理工具”中运行“网络负载平衡管理器”，用鼠标右键单击“网络负载平衡群集”，从出现的菜单中 选择“新建群集”，进入“群集参数”界面（图1）。 图1 在“IP地址”后面输入规划的群集参数地址202.206.197.195，在子网掩码处使用默认值，在“完整Internet名称”后面输入 cluster.heinfo.edu.cn（也可以是其他的名称，但输入的DNS名称必须与输入的IP地址相符）。 如果允许远程控制，请选中“允许远程控制”，并在“远程密码”和“确认密码”处输入可以进行远程控制的密码。 ②点击“下一步”按钮，进入群集IP地址页面后再进入“端口规则”界面，点击“下一步”按钮，进入“连接”界面（图2）。 图2 ③在“连接”界面的“主机”栏中输入当前计算机的名称w2003-1，然后点击“连接”按钮，将在“对配置一个新的群集可用的接口”框中显示出 连接的计算机的网卡及IP地址。选择与群集IP地址同一网段的地址（用于对外提供网络应用的网卡），然后点击“下一步”按钮，进入设置“主机参数”界面， 点击“完成”按钮，系统将自动开始网络负载平衡群集的配置。几分钟后，网络负载平衡群集配置完成。 ④打开第二台计算机，并以管理员的身份登录进入。 [...]]]></description>
			<content:encoded><![CDATA[<p>以前一直研究的都是基于Linux/FreeBSD下的负载均衡架构，在我另外一篇负载均衡文章里面专门提到过相关的内容，今天无意中看到一篇文章 谈到在window 2003 server上实现负载均衡，这还是第一次看到，实现的方式类似Linux的LVS软件方式，之前在Windows  2000和XP中都没有类似的功能，感觉挺有意思，搜集过来大家分享。</p>
<p>[原文如下]</p>
<p>在现行的许多网络应用中，有时一台服务器往往不能满足客户端的要求，此时只能通过增加服务器来解决问题。<br />
那么，有没有一个办法或者技术来解决此类问题呢?使用Windows 2000或Windows Server  2003中的网络负载平衡群集就可以（本文将介绍Windows Server 2003中的网络负载平衡技术的实现方法）。<span id="more-3826"></span></p>
<p>一、网络负载平衡的优点</p>
<p>1.网络负载平衡允许你将传入的请求传播到最多达32台的服务器上，即可以使用最多32台服务器共同分担对外的网络请求服务。网络负载平衡技术 保证即使是在负载很重的情况下它们也能作出快速响应。</p>
<p>2.网络负载平衡对外只须提供一个IP地址（或域名）。</p>
<p>3.如果网络负载平衡中的一台或几台服务器不可用时，服务不会中断。网络负载平衡自动检测到服务器不可用时，能够迅速在剩余的服务器中重新指派 客户机通讯。此保护措施能够帮助你为关键的业务程序提供不中断的服务。可以根据网络访问量的增多来增加网络负载平衡服务器的数量。</p>
<p>4.网络负载平衡可在普通的计算机上实现。</p>
<p>在Windows Server 2003中，网络负载平衡的应用程序包括Internet信息服务(IIS)、ISA　Server  2000防火墙与代理服务器、VPN虚拟专用网、终端服务器、Windows Media  Services（Windows视频点播、视频广播）等服务。同时，网络负载平衡有助于改善你的服务器性能和可伸缩性，以满足不断增长的基于 Internet客户端的需求。</p>
<p>网络负载平衡可以让客户端用一个逻辑Internet名称和虚拟IP地址（又称群集IP地址）访问群集，同时保留每台计算机各自的名称。</p>
<p>下面，我们将在两台安装Windows Server 2003的普通计算机上，介绍网络负载平衡的实现及应用。</p>
<p>这两台计算机中，一台计算机名称为w2003-1，IP地址为202.206.197.190，另一台名为w2003-2，IP地址为 202.206.197.191。</p>
<p>规划网络负载平衡群集使用的IP地址为202.206.197.195，规划网络负载平衡群集完整的计算机名称为 cluster.heinfo.edu.cn。你需要在heinfo.edu.cn域中注册此主机名称并将地址设置为202.206.197.195。如 果你没有DNS，可以在需要访问网络负载平衡的客户机（包括网络负载平衡主机）上编辑%systemroot%system32driversetc目录 下的hosts文件，添加一条信息“202.206.197.195  cluster.heinfo.edu.cn”，即可解决DNS域名解析的问题。</p>
<p>当正式应用时，客户机只需要使用cluster.heinfo.edu.cn或IP地址202.206.197.195来访问服务器，网络服务 平衡会根据每台服务器的负载情况自动选择202.206.197.190或者202.206.197.191对外提供服务。</p>
<p>网络负载平衡的实现过程如下：</p>
<p>在实现网络负载平衡的每一台计算机上，只能安装TCP/IP协议，不要安装任何其他的协议（如IPX协议或者NetBEUI协议），在网络属性 中，“网络负载平衡”也不能被选择，这可以从“网络连接属性”中查看。</p>
<p>①先进入第一台计算机，以管理员身份登录，从“管理工具”中运行“网络负载平衡管理器”，用鼠标右键单击“网络负载平衡群集”，从出现的菜单中 选择“新建群集”，进入“群集参数”界面（图1）。</p>
<p><a href="http://blog.haohtml.com/wp-content/uploads/2010/06/1_01.jpg"><img class="alignnone size-full wp-image-3827" title="1_01" src="http://blog.haohtml.com/wp-content/uploads/2010/06/1_01.jpg" alt="1_01" width="400" height="369" /></a><br />
图1</p>
<p>在“IP地址”后面输入规划的群集参数地址202.206.197.195，在子网掩码处使用默认值，在“完整Internet名称”后面输入 cluster.heinfo.edu.cn（也可以是其他的名称，但输入的DNS名称必须与输入的IP地址相符）。</p>
<p>如果允许远程控制，请选中“允许远程控制”，并在“远程密码”和“确认密码”处输入可以进行远程控制的密码。<br />
②点击“下一步”按钮，进入群集IP地址页面后再进入“端口规则”界面，点击“下一步”按钮，进入“连接”界面（图2）。</p>
<p><a href="http://blog.haohtml.com/wp-content/uploads/2010/06/win-2.jpg"><img class="alignnone size-full wp-image-3828" title="win-2" src="http://blog.haohtml.com/wp-content/uploads/2010/06/win-2.jpg" alt="win-2" width="400" height="369" /></a><br />
图2</p>
<p>③在“连接”界面的“主机”栏中输入当前计算机的名称w2003-1，然后点击“连接”按钮，将在“对配置一个新的群集可用的接口”框中显示出 连接的计算机的网卡及IP地址。选择与群集IP地址同一网段的地址（用于对外提供网络应用的网卡），然后点击“下一步”按钮，进入设置“主机参数”界面， 点击“完成”按钮，系统将自动开始网络负载平衡群集的配置。几分钟后，网络负载平衡群集配置完成。</p>
<p>④打开第二台计算机，并以管理员的身份登录进入。</p>
<p>注意：在网络负载平衡中的每个节点上，管理员账号的用户名和密码最好一致。</p>
<p>⑤然后，在第一台计算机上，用鼠标右键单击新创建的群集，从出现的菜单中选择“添加主机到群集”。将出现“连接”界面，在“主机”中输入第二台 计算机的计算机名称，点击“连接”按钮，将会在“对配置群集可用的接口”下面显示出连接的计算机上的网络配置。选择202.206.197.191的网 卡，进入主机参数界面，点击“完成”按钮，即可返回网络负载平衡管理器（图3）。</p>
<p><a href="http://blog.haohtml.com/wp-content/uploads/2010/06/3_01.jpg"><img class="alignnone size-full wp-image-3829" title="3_01" src="http://blog.haohtml.com/wp-content/uploads/2010/06/3_01.jpg" alt="3_01" width="400" height="274" /></a><br />
图3</p>
<p>⑥关闭网络负载平衡管理器后再进入网络负载平衡管理器。用鼠标右键单击“网络负载平衡群集”，从出现的菜单中选择“连接到现存的”，将会弹出 “连接”界面。</p>
<p>输入第一台计算机的名称，点击“连接”按钮，在“群集”下面将列出群集的IP地址，选择此IP地址，并点击“完成”按钮，连接群集即可完成。</p>
<p>以后，如果这两台服务器不能满足需求，可以按以上步骤添加第3台、第4台计算机到网络负载平衡中以满足要求。<br />
三、用IIS服务验证网络负载平衡</p>
<p>网络负载平衡配置好后，为了实现某项具体的服务，需要在网络负载平衡的计算机上安装相应的服务。例如：为了实现IIS网站的负载平衡，需要在相 应的网络负载平衡的计算机上安装IIS服务。</p>
<p>安装网络负载平衡的应用程序时，不需要特别的方法，只需要在配置好网络负载平衡的计算机上安装相应的服务即可。但是为了让每个用户在通过网络负 载平衡访问到不同的计算机时，能够访问到一致的数据，需要在网络负载平衡的每台计算机上保持数据的一致性。举例来说：实现了两个节点的IIS的网络负载平 衡，为了保证两个网站内容的一致性，除了这两个IIS服务器的配置相同外，相应的网站数据必须一致。</p>
<p>为了检验网络负载平衡，我们可以通过IIS来进行验证，其他的一些应用如终端服务、Windows Media服务与IIS的应用相类似。</p>
<p>在网络负载平衡的每一台计算机上安装IIS服务，方法如下：</p>
<p>在“添加/删除程序”中，点击“添加Windows组件”，进入Windows组件向导，双击“应用程序服务器”，进入“应用程序服务器”（图 4）。</p>
<p><a href="http://blog.haohtml.com/wp-content/uploads/2010/06/4_01.jpg"><img class="alignnone size-full wp-image-3830" title="4_01" src="http://blog.haohtml.com/wp-content/uploads/2010/06/4_01.jpg" alt="4_01" width="449" height="345" /></a><br />
图4</p>
<p>选中ASP.NET、Internet信息服务及应用网络COM+访问后，即可开始安装IIS服务。</p>
<p>安装之后，进入第一台计算机的inetpubwwwroot目录，新建一个文本文件，输入以下内容：<br />
This win2003-1</p>
<p>然后将它保存为default.htm文件。这个网页在IE中将显示如下内容：</p>
<p>This w2003-1</p>
<p>在第二台计算机的inetpubwwwroot目录，新建一个文本文件，并输入下面的内容：<br />
This win2003-2</p>
<p>这个网页在IE浏览器中将显示“This w2003-2”，随后将这个文件以default.htm名称保存。</p>
<p>然后，在其他计算机上的IE浏览器中键入http//cluster.heinfo.edu.cn，将会显示为“This  win2003-1”或“This  win2003-2”，根据网络的负载，网络负载平衡会自动转发到第一台计算机或第二台计算机。为了验证效果，你可以在浏览的时候，拔掉第一台计算机的网 线或拔掉第二台机器的网线，将会发现浏览到的将是不同内容。当然，我们只是测试的时候，为了验证网络负载平衡的效果，两个网站的内容不一致，而在正式应用 的时候，网络负载平衡群集的每个节点计算机的内容将是一致的，这样，不管使用那一个节点响应，都保证访问的内容是一致的。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/3826/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows2003下的分区工具软件</title>
		<link>http://blog.haohtml.com/index.php/archives/2369</link>
		<comments>http://blog.haohtml.com/index.php/archives/2369#comments</comments>
		<pubDate>Thu, 24 Sep 2009 06:46:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[磁盘分区]]></category>
		<category><![CDATA[win2003]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2369</guid>
		<description><![CDATA[Acronis PartitionExpert 2003是一个易用强大的分区管理程序，它支持常用的FAT16/FAT32，NTFS，Linux Ext2/Ext3,Linux Swap,ReiserFS格式的分区。它可以让你的硬盘使用的更好，可以帮你分区，改变分区的大小，复制分区，分区格式变换（FAT16,FAT32之间，Linux Ext2格式和Ext3格式之间的数据无损转换）等等。如果你对这些不熟悉，软件提供自动模式给使用者，对高级的使用者，软件提供了专家模式，软件的运行速度快于比现在的其他分区管理程序。软件支持大于180G的硬盘。]]></description>
			<content:encoded><![CDATA[<p>Acronis PartitionExpert 2003是一个易用强大的分区管理程序，它支持常用的FAT16/FAT32，NTFS，Linux Ext2/Ext3,Linux Swap,ReiserFS格式的分区。它可以让你的硬盘使用的更好，可以帮你分区，改变分区的大小，复制分区，分区格式变换（FAT16,FAT32之间，Linux Ext2格式和Ext3格式之间的数据无损转换）等等。如果你对这些不熟悉，软件提供自动模式给使用者，对高级的使用者，软件提供了专家模式，软件的运行速度快于比现在的其他分区管理程序。软件支持大于180G的硬盘。</p>
<p><span> </span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">前些时候换了硬盘，由于分区不够合理，使用一段时间后，非Linux分区空间告急，看来需要向Linux分区要点空间了。鉴于笔者的硬盘上的分区类型太多，笔者找到了一款号称完全支持众多分区格式的无损分区软件——Acronis PartitionExpert，决定用它来试一下。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>分区工具<br />
软件名称：Acronis PartitionExpert<br />
软件大小：11.5MB<br />
软件类型：共享软件<br />
下载地址：http://www.acronis.com</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>它的安装非常简单，一路Next就可以了。只有一点要注意，安装过程中，软件会问你是否生成PartitionExpert 启动盘，可以先选择不制作启动盘，以后要用到启动盘时，可以通过软件提供的启动盘制作工具来制作。<br />
安装完成后，双击桌面上的“Acronis PartitionExpert”图标，软件首先对系统进行分析，如果是第一次使用，会让你选择是采用Automatic mode（自动模式）还是Manual Mode（手动模式）。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>对普通用户来说，为了安全起见，建议采用自动模式，利用Wizards（向导）来工作。软件启动后的界面如图1所示。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;" align="center"><span><a href="/index.php/archives/2369/acronis-partitionexpert-1"><img class="aligncenter size-full wp-image-2847" title="Acronis-PartitionExpert-1" src="/wp-content/uploads/2009/09/Acronis-PartitionExpert-1.jpg" alt="Acronis-PartitionExpert-1" width="500" height="398" /></a><br />
图1</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>提示：软件提供了四种分区图标显示形式，十五种图标排序方式。而且你还可以依照你所做的操作不同，自定义图标后所跟的详细资料。这些操作均可在“View”菜单下完成。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><span><strong>一、增加分区空间</strong></span></span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><strong></strong>我们的目的是增加分区的空间，所以先选择左边“Wizards”中的第二个选项“Increase Free Space”（增加剩余空间），点击它后会进入增加空间向导（图2）。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;" align="center"><span><a href="/index.php/archives/2369/acronis-partitionexpert-2"><img class="aligncenter size-full wp-image-2848" title="Acronis-PartitionExpert-2" src="/wp-content/uploads/2009/09/Acronis-PartitionExpert-2.jpg" alt="Acronis-PartitionExpert-2" width="453" height="382" /></a><br />
图2</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>首先选择的是要对哪一个分区进行扩容，在这里我们选择“E：”，点击“Next”后进入下一个窗口（图3）。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;" align="center"><span><a href="/index.php/archives/2369/acronis-partitionexpert-3"><img class="aligncenter size-full wp-image-2849" title="Acronis-PartitionExpert-3" src="/wp-content/uploads/2009/09/Acronis-PartitionExpert-3.jpg" alt="Acronis-PartitionExpert-3" width="456" height="382" /></a><br />
图3</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><span>这里要选择的是从哪几个分区中腾出空间来，你只要选中分区前面的复选框即可。在这里大家应该注意到，Linux Swap分区是灰色不可选的。</span></span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>点击“Next”后，软件会扫描硬盘，计算出扩容后E分区容量的最大值和最小值，在图4中就可以根据需要调整E分区的大小了。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;" align="center"><span><a href="/index.php/archives/2369/acronis-partitionexpert-4"><img class="aligncenter size-full wp-image-2850" title="Acronis-PartitionExpert-4" src="/wp-content/uploads/2009/09/Acronis-PartitionExpert-4.jpg" alt="Acronis-PartitionExpert-4" width="450" height="378" /></a><br />
图4</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>调整好E分区的大小后，进入下一个窗口，检查一下调整后各分区的容量情况，如果没有问题，就可以选择“Finish”按钮，返回图1所示的主界面。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>提示：如果发现前面的操作过程中有不满意的地方也没关系，可以看到，图1的左上角的箭头标志此时已经变蓝了，它们就是“Redo”和“Undo”按钮，也就是说你可以撤销前面的操作。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><span>另外点击“Operations”菜单下的“Show”子菜单，会弹出一个窗口，软件向导在后台所做的各项工作都显示在里面。检查后如果确信没有误操作，就可以执行“Operations”菜单下的”Commit“提交作业了（图5）。</span></span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;" align="center"><span><a href="/index.php/archives/2369/acronis-partitionexpert-5"><img class="aligncenter size-full wp-image-2851" title="Acronis-PartitionExpert-5" src="/wp-content/uploads/2009/09/Acronis-PartitionExpert-5.jpg" alt="Acronis-PartitionExpert-5" width="512" height="440" /></a><br />
图5</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>在系统、硬盘一阵繁忙之后，重新启动电脑，一切工作就完成了，简单吧。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><strong>二、创建分区</strong></span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><strong></strong>让我们看看用它还可以做什么工作。当我们需要创建一个单独的分区时，选择第一个选项创建新的分区，首先我们要选择从哪些分区中腾出空余的空间，然后选择所建分区的大小，软件所建分区的最小空间为7.813MB，再下面就是选择分区的类型，可选项分别为Active（活动）、Primary（主）和Logic（逻辑），分区的文件系统、所分配的盘符和卷标。做完以后提交作业就可以了。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><strong><span>三、拷贝分区</span></strong></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>选择第三个选项就是分区的拷贝，这为我们提供了备份分区的另一种方式。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>首先我们要选择拷贝哪一个分区，然后选择要把这个分区放到什么位置，从哪几个分区中给它腾出位置，一共要腾出多大位置，选择分区的类型，分区的文件系统，分配的盘符，卷标。做完以后提交作业就可以了。<br />
另外，如果你觉得在Windows下处理分区不安全的话，PartitionExpert同时也提供了它自己的启动盘制作工具。选择“开始→程序→Acronis→PartitionExport→Bootable Rescue Media Builder”，系统让你选择所做的启动盘是采用Full Version完全版本还是Safe Version安全版本，如果选择完全版本，那么就包含支持USB/PCMCIA/SCSI硬盘的驱动程序。如果电脑上有刻录机，就准备一张空白刻录盘，如果没有就准备4张软盘，然后点击“Next”吧。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>利用它制作的启动盘，可以用来启动电脑和PartitrionExpert软件，其界面和使用方式跟在Windows下使用一样。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span>如果你对分区操作比较熟悉的话，试试它的手动模式，相信一定会有所收获的。</span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px;"><span><a title="PartitionExpert" href="/attachments/month_0909/partitionexpert2003.rar">点击这里下载此软件</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/2369/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用Windows 2003实现软RAID</title>
		<link>http://blog.haohtml.com/index.php/archives/1001</link>
		<comments>http://blog.haohtml.com/index.php/archives/1001#comments</comments>
		<pubDate>Mon, 09 Feb 2009 06:03:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[软RAID]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=1001</guid>
		<description><![CDATA[一、概述 

　　大家知道，硬件RAID解决方案速度快、稳定性好，可以有效地提供高水平的硬盘可用性和冗余度，但是居高不下的价格实在令人可畏。 不过可庆幸的是，Windows 2003提供了内嵌的软件RAID功能，并且软RAID可以实现RAID-0、RAID-1、RAID-5。软RAID不仅实现上非常方便，而且还大量地节约了宝贵的资金，确实是Windows 2003 Server的一个很实用的新功能。RAID-5 卷是数据和奇偶校验间断分布在三个或更多物理磁盘的容错卷。 

　　如果物理磁盘的某一部分失败，我们可以用余下的数据和奇偶校验重新创建磁盘上失败的那一部分上的数据。对于多数活动由读取数据构成的计算机环境中的数据冗余来说，RAID-5 卷是一种很好的解决方案。可使用基于硬件或基于软件的解决方案来创建 RAID-5 卷。通过基于硬件的 RAID，智能磁盘控制器处理组成 RAID-5 卷的磁盘上的冗余信息的创建和重新生成。 ]]></description>
			<content:encoded><![CDATA[<p><strong>一、概述 </strong></p>
<p>　　大家知道，硬件RAID解决方案速度快、稳定性好，可以有效地提供高水平的硬盘可用性和冗余度，但是居高不下的价格实在令人可畏。 不过可庆幸的是，Windows 2003提供了内嵌的软件RAID功能，并且软RAID可以实现RAID-0、RAID-1、RAID-5。软RAID不仅实现上非常方便，而且还大量地节约了宝贵的资金，确实是Windows 2003 Server的一个很实用的新功能。RAID-5 卷是数据和奇偶校验间断分布在三个或更多物理磁盘的容错卷。</p>
<p>　　如果物理磁盘的某一部分失败，我们可以用余下的数据和奇偶校验重新创建磁盘上失败的那一部分上的数据。对于多数活动由读取数据构成的计算机环境中的数据冗余来说，RAID-5 卷是一种很好的解决方案。可使用基于硬件或基于软件的解决方案来创建 RAID-5 卷。通过基于硬件的 RAID，智能磁盘控制器处理组成 RAID-5 卷的磁盘上的冗余信息的创建和重新生成。</p>
<p>　　Windows Server 2003 家族操作系统提供基于软件的 RAID，其中 RAID-5 卷中的磁盘上的信息的创建和重新生成将由“磁盘管理”来处理，两种情况下数据都将跨磁盘阵列中的所有成员进行存储。当然，软RAID的性能和效率是不能与硬RAID相提并论的。下面我们首先从动态磁盘的创建谈起，然后说明在Windows 2003 Server 实现如何实现软RAID，最后讲一下软RAID的管理。</p>
<p><strong>二、创建动态磁盘 </strong></p>
<p>　　 在安装Windows 2003 Server时，硬盘将自动初始化为基本磁盘。我们不能在基本磁盘分区中创建新卷集、条带集或者RAID-5组，而只能在动态磁盘上创建类似的磁盘配置。也就是说，如果想创建RAID-0、RAID-1或RAID-5卷，就必须使用动态磁盘。在Windows 2003 Server安装完成后，可使用升级向导将它们转换为动态磁盘。</p>
<p>　　在将一个磁盘从基本磁盘转换为动态磁盘后，磁盘上包含的将是卷，而不再是磁盘分区。其中的每个卷是硬盘驱动器上的一个逻辑部分，还可以为每个卷指定一个驱动器字母或者挂接点。但是要注意的是只能在动态磁盘上创建卷。动态磁盘有以下几个优于基本磁盘的特点：</p>
<p>　　卷可以扩展到包含非邻接的空间，这些空间可以在任何可用的磁盘上。<br />
　　对每个磁盘上可以创建的卷的数目没有任何限制。<br />
　　Windows 2003将动态磁盘配置信息存储在磁盘上，而不是存储在注册表中或者其他位置。同时，这些信息不能被准确地更新。Windows 2003将这些磁盘配置信息复制到所有其他动态磁盘中。因此，单个磁盘的损坏将不会影响到访问其他磁盘上的数据。</p>
<p>　　一个硬盘既可以是基本的磁盘，也可以是动态的磁盘，但不能二者兼是，因为在同一磁盘上不能组合多种存储类型。但是，如果计算机有多个硬盘，就可以将各个硬盘分别配置为基本的或动态的。</p>
<p>　　 1、从基本磁盘升级到动态磁盘：</p>
<p>　　①依次单击“开始”-&gt;“所有程序”-&gt;“管理工具”-&gt;“计算机管理”选项，显示“计算机管理”窗口。</p>
<p>　　②在左侧控制台中依次展开“存储”-&gt;“磁盘管理”选项，以显示计算机中安装的所有磁盘。</p>
<p>　　③右击要设置为动态磁盘的硬盘，并在弹出的快捷菜单中选择“升级到动态磁盘”选项，将显示“升级到动态磁盘”对话框。</p>
<p>　　④选中要升级的磁盘，然后单击“确定”：按钮，将显示“要升级的磁盘”对话框，在这里要求用户对要升级为动态磁盘的硬盘进行确认。这样做的原因很简单，因为这一升级操作是不可逆的。也就是说，基本磁盘可以升级为动态磁盘，但动态磁盘却不能恢复为基本磁盘。</p>
<p>　　 ⑤单击“升级”按钮，将显示“磁盘管理”提示框，系统再次要求用户对磁盘升级予以确认。当将该磁盘升级为动态磁盘后，Windows98/Me等操作系统将不能再从该磁盘引导启动。</p>
<p>　　⑥单击“是”按钮，将显示“升级磁盘”警告框。在这里提示要升级磁盘上的文件系统将被强制卸下，并要求用户对该操作进一步予以确认。</p>
<p>　　 ⑦单击“是”按钮，系统将开始磁盘的升级过程。当升级完成后，将显示 “确认”警告框，单击“确定”按钮将重新启动计算机，以完成磁盘的升级过程。</p>
<p>　　 在升级到动态磁盘时，应该注意以下几个方面的问题：</p>
<p>　　 必须以管理员或管理组成员的身份登录才能完成该过程。如果计算机与网络连接，则网络策略设置也可能阻止我们完成此步骤。<br />
　　 将基本磁盘升级到动态磁盘后，就再也不能将动态卷改回到基本分区。这时惟一的方法就是，必须删除磁盘上的所有动态卷，然后使用“还原为基本磁盘”命令。<br />
　　 在升级磁盘之前，应该关闭在那些磁盘上运行的程序。<br />
　　 为保证升级成功，任何要升级的磁盘都必须至少包含1MB的未分配空间。在磁盘上创建分区或卷时，“磁盘管理”工具将自动保留这个空间，但是带有其他操作系统创建的分区或卷的磁盘上可能就没有这个空间。<br />
　　 扇区大小超过512字节的磁盘，不能从基本磁盘升级为动态磁盘。<br />
　　 一旦升级完成，动态磁盘就不能包含分区或逻辑驱动器，也不能被非Windows 2003的其他操作系统所访问。</p>
<p>　　 2、将新磁盘设置为动态磁盘</p>
<p>　　①计算机安装新硬盘后，当第一次访问“计算机管理”中的“磁盘管理”工具时，将自动运行“写入签名和升级磁盘向导”窗口。</p>
<p>　　②单击“下一步”按钮，将显示“选择要写入签名的磁盘”页面，在该列表中选择要写入签名的磁盘。需要注意的是，磁盘在安装到系统前必须进行签名。</p>
<p>　　③单击“下一步”按钮，将显示“选择要升级的磁盘”页面，选择要升级为动态磁盘的磁盘。</p>
<p>　　④单击“下一步”按钮，将显示“完成写入签名和升级磁盘向导”页面，在这里要求确认签名并升级的磁盘。如果有任何不妥，可单击“上一步”按钮返回并重新进行设置。</p>
<p>　　⑤单击“完成”按钮，动态磁盘升级过程完成。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/1001/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows2003下APACHE2.2.8优化配置手记(一)</title>
		<link>http://blog.haohtml.com/index.php/archives/756</link>
		<comments>http://blog.haohtml.com/index.php/archives/756#comments</comments>
		<pubDate>Sat, 27 Dec 2008 06:35:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache优化]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.51english.net.cn/?p=756</guid>
		<description><![CDATA[windows2003下APACHE2.2.8优化配置手记。
一、按照日期自定义apache日志
LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
CustomLog   "&#124;bin/rotatelogs.exe   -l   D:/apache/logs/access/%Y-%m-%d.log   86400"   common  
Errorlog "&#124;bin/rotatelogs.exe   -l   D:/apache/logs/error/%Y-%m-%d.log   86400"]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://www.phpobject.net/blog/read.php?125" target="_blank">http://www.phpobject.net/blog/read.php?125</a><br />
windows2003下APACHE2.2.8优化配置手记。<br />
<strong><br />
一、按照日期自定义apache日志</strong></p>
<div class="code">
LogFormat &#8220;%v %l %u %t \&#8221;%r\&#8221; %&gt;s %b&#8221; comonvhost<br />
CustomLog   &#8220;|bin/rotatelogs.exe   -l   D:/apache/logs/access/%Y-%m-%d.log   86400&#8243;   common  <br />
Errorlog &#8220;|bin/rotatelogs.exe   -l   D:/apache/logs/error/%Y-%m-%d.log   86400&#8243;</div>
<p><strong><br />
二、不能加载动态库的错误。</strong></p>
<p>路径明显正确的情况下出现“PHP Warning:  PHP Startup: Unable to load dynamic library”。。原因是动态库有些是依赖其他的DLL的。解决方法<br />
1 将这些依赖的dll拷贝到％windir％\system32下<br />
2 或者将PHP5的安装目录添加到%PATH%中。<br />
<strong><br />
三、Apache与WinSock v2相冲突</strong><br />
在错误日志中看到</p>
<div class="code">
(OS 64)指定的网络名不再可用。  : winnt_accept: Asynchronous AcceptEx failed.</div>
<p>AcceptEx()是一个微软的WinSock2 API ，通过使用BSD风格的accept() API提供了性能改善。一些流行的Windows产品，比如防病毒软件或虚拟专用网络软件，会干扰AcceptEx()的正确操作。具体看apache手册关于Win32DisableAcceptEx 的说明。<br />
解决方法：<br />
在httpd.conf加上</p>
<p>Win32DisableAcceptEx # 禁止使用AcceptEx()</p>
<p><strong>四、最大连接数</strong><br />
错误日志中提醒<br />
Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting<br />
很明显，把ThreadsPerChild设置的更大一点就可以了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/756/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows下快速安装CACTI流量监控</title>
		<link>http://blog.haohtml.com/index.php/archives/692</link>
		<comments>http://blog.haohtml.com/index.php/archives/692#comments</comments>
		<pubDate>Tue, 09 Dec 2008 01:40:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[CACTI]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[流量监控]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=692</guid>
		<description><![CDATA[　【IT专家网】独家：公司最近要对几台上架的服务器进行远程监控，需要提出解决方案。前一段时间曾经在CU上见人们都在讨论CACTI，所以就对照网上的教程进行了CACTI安装调试，但是可能是自己太菜了，在这个过程中遇到了许多问题，在这里把这个过程记录下来，给像我一样的菜鸟。

　　CACTI是一套PHP程序，它利用SNMPGET采集数据，使用RRDTOOL绘图引擎绘图，RRDTOOL是MRTG的替代者，它们的作者是一个人。由于RRDTOOL功能过于强大，所以使用起来命令过于复杂，而CACTI就在这时出现了，它是图形界面，使用简单，使不用直接和RRDTOOL接触。但是它是以SNMP和RRDTOOL为基础的，所以最好深入学习一下NET-SNMP和RRDTOOL的使用。]]></description>
			<content:encoded><![CDATA[<p>官方教程：</p>
<blockquote><p><a href="http://www.cacti.net/documentation.php">http://www.cacti.net/documentation.php</a></p></blockquote>
<p>【IT专家网】独家：公司最近要对几台上架的服务器进行远程监控，需要提出解决方案。前一段时间曾经在CU上见人们都在讨论CACTI，所以就对照网上的教程进行了CACTI安装调试，但是可能是自己太菜了，在这个过程中遇到了许多问题，在这里把这个过程记录下来，给像我一样的菜鸟。</p>
<p>CACTI是一套PHP程序，它利用SNMPGET采集数据，使用RRDTOOL绘图引擎绘图，RRDTOOL是MRTG的替代者，它们的作者是一个人。由于RRDTOOL功能过于强大，所以使用起来命令过于复杂，而CACTI就在这时出现了，它是图形界面，使用简单，使不用直接和RRDTOOL接触。但是它是以SNMP和RRDTOOL为基础的，所以最好深入学习一下NET-SNMP和RRDTOOL的使用。</p>
<p>好了，废话不多说了，我们来看看在Windows下如何安装CACTI吧。正如我前面说的那样，CACTI是一套PHP系统，所以如果说是安装调试的话最主要的还的PHP环境的建立。其它的RRDTOOL和Net-Snmp简单应用的话只要安装上就可以，不用做太多的设置。</p>
<p>PHP是一套强大的脚本语言，最初只能应用于Linux下面，随着它的发展，已经能够在Windows下使用了。由于它最初是应用于Linux下的，所以它安装起来不像Windows的其它软件那样简单，需要进行一些必要的配置，这对使惯Windows的人来说可能一时不能适应。它本身是一套脚本解释引擎，本身并不具有Web服务器的功能，它是以插件的形式和Apache、IIS等Web服务一起工作的。</p>
<p>Mysql是一套开源的强大的数据库系统，最初也是在Linux上应用，现在也可以在Windows下使用，最新版本有安装、设置向导，使用起来还是很方便的。</p>
<p><strong>一、Appserv的安装，及PHP的设置</strong></p>
<p>在上一篇文章里我详细的写了在Winodws下安装设置Apache、PHP、Mysql，但是感觉这样还是太显麻烦，一样一样装，一样一样设，太烦琐，而现在大多数网站也都是用的Apache+PHP+Mysql，环境都差不多，那么有没有更简单的方法来搭建这个服务器环境呢?答案肯定是有的，不然也不会有这篇文章了。</p>
<p>通过在网上的搜索，我发现Appserv这个软件，AppServ 是 Windows下PHP 网页架站工具组合包，泰国的作者将一些网络上免费的架站资源重新包装成单一的安装程序，以方便初学者快速完成架站，AppServ 所包含的软件有：Apache、Apache Monitor、PHP、MySQL、PHP-Nuke、phpMyAdmin，目前最新版本是2.5.8。这个软件安装起来非常方便，一路下一步就可以非常方便的安装完成，而且安装完成后一个Apache+PHP+Mysql的环境就算搭建好了。而且这个工具还安装了PhpMyAdmin这个Mysql的管理工具，对于菜鸟来说实在是太方便了。在这里主要需要注意的是如果本机默认的80端口已经在使用了，记着把默认的80端口改成没有使用的，如：8080，还有就是Mysql的登录密码。</p>
<p>由于这个环境是PHP网站的环境，所以我们还要对PHP进行一些必要的设置，让它符合我们的需求，其实主要就是加几个环境变量。我们打开“开始”-“控制面板”-“系统”-“高级”-“环境变量”。在“系统变量”选项卡里点添加，在弹出的窗口中变量名输入MIBDIRS，变量值输入C:AppServphp5extrasmibs，确定就可以了;再找到“path”变量，点编辑，在变量值最后加入PHP的搜索路径，就是你的PHP安装路径和扩展插件路径，这里是C:AppServphp5和C:AppServphp5ext，所以我加入了“; C:AppServphp5; C:AppServphp5ext”。注意不要加双引号，只添加双引号里面的内容就可以了。</p>
<p>我们还要开启PHP对SNMP、GD、Socket的支持，打开c:windowsphp.ini文件，确保extension=php_gd2.dll、extension=php_mysql.dll、 extension=php_snmp.dll、</p>
<p>extension=php_sockets.dll三个选项前面没有分号。</p>
<p>这时我们要重新启动Windows使刚才所做的设置生效。</p>
<p><strong> 二、安装CACTI</strong></p>
<p>系统重新启动以后，我们首先要做的就是在Windows安装Net-Snmp，这个工具安装起来也是很方便的，一路下一步就好了，不用做什么设置，最好是按照Cacti默认的路径安装，这样设置起CACTI来会省不少事，Cacti默认查找Net-Snmp的路径是C:net-snmp，所以我们最好将它安装在这个目录下。</p>
<p>而RRDTOOL也已经有Windows下的版本的了，我们只要把它解压就可以了，由于CACTI默认的搜索路径是c:rrdtool，所以我们把它解压到这个目录就可以了。</p>
<p>最后我们只要把CACTI复制到Web服务器的根目录就可以了，我这里是C:AppServwww，所以我把从网上下载到的CACTI解压到了这个目录下的CACTI目录，然后打开IE输入：http://localhost，点phpMyAdmin Database Manager Version 2.9.2链接，输入Mysql的用户名和密码，进入PhpMyAdmin后，新建一个数据库“cacti”，新建一个用户“cactiuser”，密码“cactiuser”，给这个用户完全控制“cacti”数据库权限。然后选择导入数据，把C:AppServwwwcacticacti.sql文件导入到cacti数据库。到此我们就可以打开IE，输入http://localhost/cacti/install.php来对cacti进行一些简单的设置，主要是路径的设置。</p>
<p>这样我们就安装成功了CACTI，当然我们还需要进行任务计划的设置等，详细的设置请参见我的上一篇文章“在Windows下安装CACTI”。</p>
<p>最后附上本次所需要软件的下载地址：</p>
<p>AppServ：http://www.onlinedown.net/soft/35753.htm</p>
<p>CACTI：http://www.cacti.net/downloads</p>
<p>RRDTOOL For Windows：http://www.onlinedown.net/soft/35753.htm</p>
<p>Net-Snmp For Windows：</p>
<p>http://sourceforge.net/project/showfiles.php?group_id=12694&amp;package_id=162885&amp;release_id=466298</p>
<p>这些都是软件的最新稳定版本。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/692/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows下rsync的安装配置【数据同步】</title>
		<link>http://blog.haohtml.com/index.php/archives/654</link>
		<comments>http://blog.haohtml.com/index.php/archives/654#comments</comments>
		<pubDate>Sat, 29 Nov 2008 00:59:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[数据同步]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=654</guid>
		<description><![CDATA[    之前有转载了一篇《rsync中文手册，使用rsync实现网站镜像和备份》，介绍的是Linux下的安装配置，不过使用流程还是一样的。

rsync的配置环境
软件平台:windows2003
软件版本:cwRsync_2.0.10_Installer cwRsync_Server_2.0.10_Installer
硬件平台:dell2950 cpu1.6G*4 内存:4G 硬盘:1G*6 RAID5

===安装===

在WINDOWS环境下安装rsync要安装服务端和客户端

服务器端安装:运行cwRsync_Server_2.0.10_Installer
客户端安装:运行cwRsync _2.0.10_Installe

安装步骤和安装服务器端是一样的这里就不详细描述]]></description>
			<content:encoded><![CDATA[<p>    之前有转载了一篇<a href="http://www.indang.net/yinyou/2008/92.html" target="_self">《rsync中文手册，使用rsync实现网站镜像和备份》</a>，介绍的是Linux下的安装配置，不过使用流程还是一样的。</p>
<p><strong>rsync的配置环境</strong><br />
软件平台:windows2003<br />
软件版本:cwRsync_2.0.10_Installer cwRsync_Server_2.0.10_Installer<br />
硬件平台:dell2950 cpu1.6G*4 内存:4G 硬盘:1G*6 RAID5</p>
<p><strong>===安装===</strong></p>
<p>在WINDOWS环境下安装rsync要安装服务端和客户端</p>
<p>服务器端安装:运行cwRsync_Server_2.0.10_Installer<br />
客户端安装:运行cwRsync _2.0.10_Installe</p>
<p>安装步骤和安装服务器端是一样的这里就不详细描述</p>
<p><strong>===配置===</strong><br />
配置和我们在linux下面的配置一样，在安装目录中找到rsync.conf文件进行配置:</p>
<p>Rsync.conf文件:</p>
<p>pid file = /var/run/rsyncd.pid</p>
<p>lock file = /var/run/rsync.lock</p>
<p>log file = /var/log/rsyncd.log</p>
<p>uid = administrator</p>
<p>gid = administrator</p>
<p>use chroot = no</p>
<p>max connections =4</p>
<p>syslog facility = local5</p>
<p>[test]</p>
<p>path =/cygdrive/d/wlk</p>
<p>comment=/cygdrive/d/wlk comment = BACKUP CLIENT IS SOLARIS 8 E250<br />
ignore errors # 可以忽略一些无关的IO错误<br />
read only = yes # 只读<br />
list = no # 不允许列文件<br />
auth users = inburst # 认证的用户名，如果没有这行，</p>
<p>则表明是匿名<br />
secrets file = etc/inburst.pas # 认证文件名</p>
<p>在server端生成一个密码文件etc/inburst.pas</p>
<p>打开记事本</p>
<p>inburst:hack</p>
<p>保存在安装路径下面的etc文件加下面文件明保存为inburst.pas</p>
<p>在服务中把RsyncServer启动，启动类型修改为自动这样服务器端就安装设置好了</p>
<p><strong>从client端进行测试</strong><br />
下面这个命令行中-vzrtopg里的v是verbose，z是压缩，r是recursive，topg都是保持文件原有属性如属主、时间的参数。–progress是指显示</p>
<p>出详细的进度情况，–delete是指如果服务器端删除了这一文件，那么客户端也相应把文件删除，保持真正的一致。<br />
后面的<a href="mailto:inburst@ip">inburst@ip</a>中，</p>
<p>    inburst是指定密码文件中的用户名，之后的::inburst这一inburst是模块名，也就是在/etc/rsyncd.conf中自定义的名称。最后的/tmp是备份到本地的目录名。<br />
    在这里面，还可以用-e ssh的参数建立起加密的连接。可以用–password-file=/password/path/file来指定密码文件，这样就可以在脚本中使用而无需交互式地输入验证密码了，这里需要注意的是这份密码文件权限属性要设得只有属主可读。</p>
<p>在客户端运行CMD</p>
<p>rsync -av 10.0.0.16::401 /cygdrive/h/401</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/654/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windosws2003 文件夹、文件拒绝访问、无法访问的终极解决方法</title>
		<link>http://blog.haohtml.com/index.php/archives/652</link>
		<comments>http://blog.haohtml.com/index.php/archives/652#comments</comments>
		<pubDate>Sat, 29 Nov 2008 00:55:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=652</guid>
		<description><![CDATA[windosws2003 文件夹 文件 拒绝访问 无法访问 终极解决方法
您无权查看或编辑目前 200801 的权限设置;但是,您可以取得所有权或更改审核设置

详情：系统是raid1环境，期间覆盖过一次系统，自此以后很多站点目录下的目录的Administrator权限没了，有的可以打开，有的打不开直接提示：无法访问 * 拒绝访问，然后查看这个文件或文件夹的权限，点“安全”时提示：您无权查看或编辑目前 200705 的权限设置;但是,您可以取得所有权或更改审核设置。]]></description>
			<content:encoded><![CDATA[<p>windosws2003 文件夹 文件 拒绝访问 无法访问 终极解决方法<br />
您无权查看或编辑目前 200801 的权限设置;但是,您可以取得所有权或更改审核设置</p>
<p>详情：系统是raid1环境，期间覆盖过一次系统，自此以后很多站点目录下的目录的Administrator权限没了，有的可以打开，有的打不开直接提示：无法访问 * 拒绝访问，然后查看这个文件或文件夹的权限，点“安全”时提示：您无权查看或编辑目前 200705 的权限设置;但是,您可以取得所有权或更改审核设置。</p>
<p>解决方法：在站点根目录上右击－－》属性－－》安全－－》下边有个高级－－》所有者（选中“替换子容器及对象的所有者”然后点“应用”）－－》切换到审核－－》选中“口 许父项的继承审核项目传播到该对象和所有子对象,包括那些在此明确定义的项目”“口 用在此显示的那些可以应用到子对象的项目替代所有子对象的权限项目”点应用。－－》关闭所有刚才打开的窗口－－》看下是否成功，不出意外的话一般都会成功。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/652/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rsync同步服务器 windows下的架设</title>
		<link>http://blog.haohtml.com/index.php/archives/650</link>
		<comments>http://blog.haohtml.com/index.php/archives/650#comments</comments>
		<pubDate>Sat, 29 Nov 2008 00:54:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[数据备份]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=650</guid>
		<description><![CDATA[sync是linux下优秀的服务器同步备份软件，是个开源项目，用起来感觉非常的好，现在也有很多服务器是windows的，好在rsync也有windows下的版本，否则很多人将无法享受这么好的软件了。

下面讲下windows下rsync的架设步骤。

rsync特性简介

rsync是类unix系统下的数据镜像备份工具，从软件的命名上就可以看出来了——remote sync。它的特性如下：

1、可以镜像保存整个目录树和文件系统。
2、可以很容易做到保持原来文件的权限、时间、软硬链接等等。
3、无须特殊权限即可安装。
4、优化的流程，文件传输效率高。
5、可以使用rcp、ssh等方式来传输文件，当然也可以通过直接的socket连接。
6、支持匿名传输。
2. 安装]]></description>
			<content:encoded><![CDATA[<p>sync是linux下优秀的服务器同步备份软件，是个开源项目，用起来感觉非常的好，现在也有很多服务器是windows的，好在rsync也有windows下的版本，否则很多人将无法享受这么好的软件了。</p>
<p>下面讲下windows下rsync的架设步骤。</p>
<p><strong>rsync特性简介</strong></p>
<p>rsync是类unix系统下的数据镜像备份工具，从软件的命名上就可以看出来了——remote sync。它的特性如下：</p>
<p>1、可以镜像保存整个目录树和文件系统。<br />
2、可以很容易做到保持原来文件的权限、时间、软硬链接等等。<br />
3、无须特殊权限即可安装。<br />
4、优化的流程，文件传输效率高。<br />
5、可以使用rcp、ssh等方式来传输文件，当然也可以通过直接的socket连接。<br />
6、支持匿名传输。<br />
2. 安装<br />
<strong>rsync的配置环境<br />
</strong>软件平台：windows2003<br />
软件版本：cwRsync_2.0.10_Installer cwRsync_Server_2.0.10_Installer<br />
硬件平台：dell2950 cpu1.6G*4 内存:4G 硬盘：1G*6 RAID5</p>
<p>2． 安装</p>
<p>在WINDOWS环境下安装rsync要安装服务端和客户端</p>
<p>服务器端安装:运行cwRsync_Server_2.0.10_Installer<br />
客户端安装:运行cwRsync _2.0.10_Installe</p>
<p>安装步骤和安装服务器端是一样的这里就不详细描述</p>
<p><strong>3. 配置</strong><br />
配置和我们在linux下面的配置一样，在安装目录中找到rsync.conf文件进行配置：</p>
<p>Rsync.conf文件：</p>
<p>pid file = /var/run/rsyncd.pid</p>
<p>lock file = /var/run/rsync.lock</p>
<p>log file = /var/log/rsyncd.log</p>
<p>uid = administrator</p>
<p>gid = administrator</p>
<p>use chroot = no</p>
<p>max connections =4</p>
<p>syslog facility = local5</p>
<p>[test]</p>
<p>path =/cygdrive/d/wlk</p>
<p>comment=/cygdrive/d/wlk comment = BACKUP CLIENT IS SOLARIS 8 E250<br />
ignore errors # 可以忽略一些无关的IO错误<br />
read only = yes # 只读<br />
list = no # 不允许列文件<br />
auth users = inburst # 认证的用户名，如果没有这行，</p>
<p>则表明是匿名<br />
secrets file = etc/inburst.pas # 认证文件名</p>
<p>在server端生成一个密码文件etc/inburst.pas</p>
<p>打开记事本</p>
<p>inburst:hack</p>
<p>保存在安装路径下面的etc文件加下面文件明保存为inburst.pas</p>
<p>在服务中把RsyncServer启动，启动类型修改为自动<br />
这样服务器端就安装设置好了</p>
<p><strong>从client端进行测试</strong><br />
下面这个命令行中-vzrtopg里的v是verbose，z是压缩，r是recursive，topg都是保持文件原有属性如属主、时间<br />
的参数。&#8211;progress是指显示</p>
<p>出详细的进度情况，&#8211;delete是指如果服务器端删除了这一文件，那么客户端也相应把文件删除，保持真正的一致。<br />
后面的<a href="mailto:inburst@ip">inburst@ip</a>中，</p>
<p>inburst是指定密码文件中的用户名，之后的::inburst这一inburst是模块名，也就是在/etc/rsyncd.conf中自定义<br />
的名称。最后的/tmp是备份<br />
到本地的目录名。<br />
在这里面，还可以用-e ssh的参数建立起加密的连接。可以用&#8211;password-file=/password/path/file来指定密码文<br />
件，这样就可以在脚本中使</p>
<p>用而无需交互式地输入验证密码了，这里需要注意的是这份密码文件权限属性要设得只有属主可读。</p>
<p>在客户端运行CMD</p>
<p>rsync -av 10.0.0.16::401 /cygdrive/h/401</p>
<p><strong>常见问题:</strong><br />
Q：如何通过ssh进行rsync，而且无须输入密码？<br />
A：可以通过以下几个步骤<br />
1. 通过ssh-keygen在server A上建立SSH keys，不要指定密码，你会在~/.ssh下看到identity和identity.pub文件<br />
2. 在server B上的home目录建立子目录.ssh<br />
3. 将A的identity.pub拷贝到server B上<br />
4. 将identity.pub加到~[user b]/.ssh/authorized_keys<br />
5. 于是server A上的A用户，可通过下面命令以用户B ssh到server B上了<br />
e.g. ssh -l userB serverB<br />
这样就使server A上的用户A就可以ssh以用户B的身份无需密码登陆到server B上了。<br />
Q：如何通过在不危害安全的情况下通过防火墙使用rsync?<br />
A：解答如下：<br />
这通常有两种情况，一种是服务器在防火墙内，一种是服务器在防火墙外。<br />
无论哪种情况，通常还是使用ssh，这时最好新建一个备份用户，并且配置sshd仅允许这个用户通过RSA认证方式进入。<br />
如果服务器在防火墙内，则最好限定客户端的IP地址，拒绝其它所有连接。<br />
如果客户机在防火墙内，则可以简单允许防火墙打开TCP端口22的ssh外发连接就ok了。<br />
Q：我能将更改过或者删除的文件也备份上来吗？<br />
A：当然可以：<br />
你可以使用如：rsync -other -options -backupdir = ./backup-2000-2-13 &#8230;这样的命令来实现。<br />
这样如果源文件:/path/to/some/file.c改变了，那么旧的文件就会被移到./backup-2000-2-13/path/to/some/file.c，<br />
这里这个目录需要自己<br />
手工建立起来<br />
Q：我需要在防火墙上开放哪些端口以适应rsync？<br />
A：视情况而定<br />
rsync可以直接通过873端口的tcp连接传文件，也可以通过22端口的ssh来进行文件传递，但你也可以通过下列命令改变它的端口：<br />
rsync &#8211;port 8730 otherhost:: 或者 rsync -e &#8216;ssh -p 2002&#8242; otherhost:<br />
Q：我如何通过rsync只复制目录结构，忽略掉文件呢？<br />
A：rsync -av &#8211;include &#8216;*/&#8217; &#8211;exclude &#8216;*&#8217; source-dir dest-dir<br />
Q：为什么我总会出现&#8221;Read-only file system&#8221;的错误呢？<br />
A：看看是否忘了设&#8221;read only = no&#8221;了<br />
Q：为什么我会出现<a href="mailto:'@ERROR">&#8216;@ERROR</a>: invalid gid&#8217;的错误呢？<br />
A：rsync使用时默认是用uid=nobody;gid=nobody来运行的，如果你的系统不存在nobody组的话，就会出现这样的错误，可以试试gid = nogroup或者其它<br />
Q：绑定端口873失败是怎么回事？<br />
A：如果你不是以root权限运行这一守护进程的话，因为1024端口以下是特权端口，会出现这样的错误。你可以用&#8211;port参数来改变。<br />
Q：为什么我认证失败？<br />
A：从你的命令行看来：<br />
你用的是：<br />
&gt; bash$ rsync -a 144.16.251.213::test test<br />
&gt; Password:<br />
&gt; @ERROR: auth failed on module test<br />
&gt; I dont understand this. Can somebody explain as to how to acomplish this.<br />
&gt; All suggestions are welcome.<br />
应该是没有以你的用户名登陆导致的问题，试试rsync -a <a href="mailto:max@144.16.251.213::test">max@144.16.251.213::test</a> test</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/650/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用Rsync从Linux到Windows远程备份</title>
		<link>http://blog.haohtml.com/index.php/archives/644</link>
		<comments>http://blog.haohtml.com/index.php/archives/644#comments</comments>
		<pubDate>Sat, 29 Nov 2008 00:49:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[远程备份]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=644</guid>
		<description><![CDATA[rsync是Linux系统下的数据镜像备份工具，从软件的命名上就可以看出来了——remote sync。rsync支持大多数的类Unix系统，无论是Linux、Solaris还是BSD上都经过了良好的测试。rsync的最新版本可以从http://rsync.samba.org/rsync/获得。它的特性如下：
1、可以镜像保存整个目录树和文件系统。
2、可以很容易做到保持原来文件的权限、时间、软硬链接等等。
3、无须特殊权限即可安装。
4、优化的流程，文件传输效率高。
5、可以使用rcp、ssh等方式来传输文件，当然也可以通过直接的socket连接。
本文介绍了如何使用rsync服务从Linux到Windows进行远程备份。
一、配置服务器端
首先我们需要配置rsync，打开配置文件/etc/xinetd.d/rsyncd.conf（如果没有请创建它），修改相应的配置项，并增加以下内容：
uid = nobody # 备份以什么身份进行，用户ID
gid = nobody # 备份以什么身份进行，组ID
#注意这个用户ID和组ID，如果要方便的话，可以设置成root，这样rsync几乎就可#以读取任何文件和目录了，但是也带来安全隐患。建议设置成只能读取你要备
#份的目录和文件即可。]]></description>
			<content:encoded><![CDATA[<p>rsync是Linux系统下的数据镜像备份工具，从软件的命名上就可以看出来了——remote sync。rsync支持大多数的类Unix系统，无论是Linux、Solaris还是BSD上都经过了良好的测试。rsync的最新版本可以从http://rsync.samba.org/rsync/获得。它的特性如下：<br />
1、可以镜像保存整个目录树和文件系统。<br />
2、可以很容易做到保持原来文件的权限、时间、软硬链接等等。<br />
3、无须特殊权限即可安装。<br />
4、优化的流程，文件传输效率高。<br />
5、可以使用rcp、ssh等方式来传输文件，当然也可以通过直接的socket连接。<br />
本文介绍了如何使用rsync服务从Linux到Windows进行远程备份。<br />
一、配置服务器端<br />
首先我们需要配置rsync，打开配置文件/etc/xinetd.d/rsyncd.conf（如果没有请创建它），修改相应的配置项，并增加以下内容：<br />
uid = nobody # 备份以什么身份进行，用户ID<br />
gid = nobody # 备份以什么身份进行，组ID<br />
#注意这个用户ID和组ID，如果要方便的话，可以设置成root，这样rsync几乎就可#以读取任何文件和目录了，但是也带来安全隐患。建议设置成只能读取你要备<br />
#份的目录和文件即可。<br />
max connections = 4　# 最大连接数为4<br />
[www] # 指定认证的备份模块名<br />
path = /www # 需要备份的目录<br />
comment = BACKUP WWW　 # 注释<br />
ignore errors　# 忽略一些无关的IO错误<br />
read only = yes　# 设置为只读<br />
list = no # 不允许列文件<br />
auth users = wwwuser　 # 认证的用户名，如果没有这行，则表明是匿名<br />
hosts allow=220.122.133.31　 #允许连接服务器的主机IP地址<br />
secrets file = /etc/wwwuser.pass # 认证文件名，用来存放密码<br />
这一段我们修改完成。<br />
注意：如果同时还需要备份其它目录的话，可以直接在配置文件的后面继续增加配置内容，例如：<br />
[database]<br />
path = /var/lib/mysql<br />
……<br />
这样就可以同时备份多个目录了。<br />
然后为备份模块设置密码文件，如上例的密码文件为/etc/wwwuser.pass，使用编辑器创建这个文件，并输入用户名称和密码：<br />
vi /etc/wwwuser.pass<br />
输入以下内容：<br />
wwwuser:123456<br />
这样，为备份模块www的用户wwwuser设置了密码123456。注意，出于安全目的，这个文件的属性必需是只有属主可读，否则rsync将拒绝运行。我们可以设置它的属性为600：<br />
chmod 600 /etc/wwwuser.pass<br />
设置rsync服务在系统启动时自动启动运行，可以通过ntsysv来设置：</p>
<p><a href="http://blog.haohtml.com/wp-content/uploads/2008/11/20080807180632876.jpg"><img class="alignnone size-medium wp-image-645" title="20080807180632876" src="http://blog.haohtml.com/wp-content/uploads/2008/11/20080807180632876-282x300.jpg" alt="" width="282" height="300" /></a></p>
<p>最后在服务器端我们需要启动rsync服务：<br />
service xinetd restart<br />
至此，服务器端配置完毕。<br />
<span id="more-644"></span></p>
<p>二、配置客户端<br />
为了在Windows环境使用rsync工具，我们需要去下载cwRsync工具，这是一个rsync for windows的版本。<br />
下载安装完成之后的目录结构类似下图所示：</p>
<p><a href="http://blog.haohtml.com/wp-content/uploads/2008/11/a1.jpg"><img class="alignnone size-medium wp-image-646" title="用Rsync从Linux到Windows远程备份" src="http://blog.haohtml.com/wp-content/uploads/2008/11/a1-300x267.jpg" alt="" width="300" height="267" /></a></p>
<p>现在我们可以在Windows环境下运行rsync工具了，举例使用下面的命令连接服务器并开始备份目录和文件：</p>
<table border="1" cellspacing="0" cellpadding="2" width="400" align="center">
<tbody>
<tr>
<td class="code" bgcolor="#e6e6e6">
<pre>rsync -vzrtopg --progress --delete wwwuser@xx.xx.xx.xx::www .\bak</pre>
</td>
</tr>
</tbody>
</table>
<p>应该可以看到：<br />
password:<br />
要求输入密码的提示，正确输入密码后就应该看到开始备份了。当然，也有可能出现类似下面的错误信息：</p>
<p>应该可以看到：<br />
password:<br />
要求输入密码的提示，正确输入密码后就应该看到开始备份了。当然，也有可能出现类似下面的错误信息：</p>
<p align="center"><a href="http://blog.haohtml.com/wp-content/uploads/2008/11/b1.jpg"><img class="alignnone size-medium wp-image-647" title="用Rsync从Linux到Windows远程备份" src="http://blog.haohtml.com/wp-content/uploads/2008/11/b1-300x82.jpg" alt="" width="534" height="153" /></a></p>
<p>引起这种错误有几种可能性，一是你没有输入正确的用户名或密码，二是你的服务器端存储密码的文件没有正确的权限，也就是你的密码文件不是类似这样子的权限：-rw&#8212;&#8212;-1 root root<br />
在备份完成之后，我们可以看到类似下图所示的状态：</p>
<p>　</p>
<p align="center"><a href="http://blog.haohtml.com/wp-content/uploads/2008/11/c.jpg"><img class="alignnone size-full wp-image-648" title="用Rsync从Linux到Windows远程备份" src="http://blog.haohtml.com/wp-content/uploads/2008/11/c.jpg" alt="" width="499" height="237" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/644/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rsync在windows与windows服务器之间的同步设置</title>
		<link>http://blog.haohtml.com/index.php/archives/642</link>
		<comments>http://blog.haohtml.com/index.php/archives/642#comments</comments>
		<pubDate>Sat, 29 Nov 2008 00:40:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[同步]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=642</guid>
		<description><![CDATA[一、windows与windows同步
1.准备两台机器：
server-----192.168.0.201
client-----192.168.0.202

2.下载windows版的rsync工具
具体软件下载链接我也忘了，不过在google应该可以搜索到。
我也将它上传到CU上……


 文件: cwRsync_2.0.10_Installer.zip 
大小: 2953KB 
下载: 下载 
 
 文件: cwRsync_Server_2.0.10_Installer.zip 
大小: 2821KB 
下载: 下载 
 
server端：cwRsync_Server_2.0.10_Installer.zip
client端：cwRsync_2.0.10_Installer.zip]]></description>
			<content:encoded><![CDATA[<div><span class="Apple-style-span" style="word-spacing: 0px; font: bold 13px/16px Verdana; text-transform: none; color: #333333; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0;"><span class="Apple-style-span" style="word-spacing: 0px; font: 13px/23px Verdana; text-transform: none; color: #595959; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0;"></p>
<p style="color: #595959; line-height: 180%;">一、windows与windows同步<br style="line-height: 180%;" />1.准备两台机器：<br style="line-height: 180%;" />server&#8212;&#8211;192.168.0.201<br style="line-height: 180%;" />client&#8212;&#8211;192.168.0.202<br style="line-height: 180%;" /><br style="line-height: 180%;" />2.下载windows版的rsync工具<br style="line-height: 180%;" />具体软件下载链接我也忘了，不过在google应该可以搜索到。<br style="line-height: 180%;" />我也将它上传到CU上……<br style="line-height: 180%;" /></p>
<table style="font: 12px/180% Verdana, Arial, Helvetica, 宋体, sans-serif; color: #595959; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0" align="center">
<tbody style="line-height: 180%;">
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center"><img style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" src="http://blog.chinaunix.net/fileicon/zip.gif" border="0" alt="" /></td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;">
<table style="font: 12px/180% Verdana, Arial, Helvetica, 宋体, sans-serif; color: #595959; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0">
<tbody style="line-height: 180%;">
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center">文件:</td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;">cwRsync_2.0.10_Installer.zip</td>
</tr>
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center">大小:</td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;">2953KB</td>
</tr>
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center">下载:</td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;"><a style="font: 12px/180% Verdana, Arial, Helvetica, 宋体, sans-serif; color: #333333; text-decoration: underline;" href="http://blogimg.chinaunix.net/blog/upfile/070917224721.zip">下载</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table style="font: 12px/180% Verdana, Arial, Helvetica, 宋体, sans-serif; color: #595959; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0" align="center">
<tbody style="line-height: 180%;">
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center"><img style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" src="http://blog.chinaunix.net/fileicon/zip.gif" border="0" alt="" /></td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;">
<table style="font: 12px/180% Verdana, Arial, Helvetica, 宋体, sans-serif; color: #595959; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0">
<tbody style="line-height: 180%;">
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center">文件:</td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;">cwRsync_Server_2.0.10_Installer.zip</td>
</tr>
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center">大小:</td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;">2821KB</td>
</tr>
<tr style="line-height: 180%;">
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;" align="center">下载:</td>
<td style="margin: 0px auto; line-height: 180%; border-width: 0px; padding: 0px;"><a style="font: 12px/180% Verdana, Arial, Helvetica, 宋体, sans-serif; color: #333333; text-decoration: underline;" href="http://blogimg.chinaunix.net/blog/upfile/070917224837.zip">下载</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>server端：cwRsync_Server_2.0.10_Installer.zip<br style="line-height: 180%;" />client端：cwRsync_2.0.10_Installer.zip<br style="line-height: 180%;" /><br style="line-height: 180%;" />3.安装 与配置<br style="line-height: 180%;" />SERVER：<br style="line-height: 180%;" />(1)安装cwRsync_Server_2.0.10_Installer.zip<br style="line-height: 180%;" />在开始程序中打开“start a unix bash shell”程序:<br style="line-height: 180%;" />进入一个类似cmd的终端,输入如下命令：<br style="line-height: 180%;" />＄/bin/activate-user.sh<br style="line-height: 180%;" />输入l<br style="line-height: 180%;" />输入administrator<br style="line-height: 180%;" />后面全按回来结束<br style="line-height: 180%;" /><br style="line-height: 180%;" />(2)启动opensshd<br style="line-height: 180%;" />打开“控制面板”－－＞“管理工具”－－＞“服务”：<br style="line-height: 180%;" />找到一个opensshd的服务，启动它<br style="line-height: 180%;" /><br style="line-height: 180%;" />(3)配置rsyncd.conf配置文件<br style="line-height: 180%;" />编辑C:\Program Files\cwRsyncServer\rsyncd.conf，内容如下：<br style="line-height: 180%;" />use chroot = false<br style="line-height: 180%;" />strict modes = false<br style="line-height: 180%;" />hosts allow = *<br style="line-height: 180%;" />log file = rsyncd.log<br style="line-height: 180%;" />pid file = rsyncd.pid<br style="line-height: 180%;" /># Module definitions<br style="line-height: 180%;" /># Remember cygwin naming conventions : c:\work becomes /cygwin/c/work<br style="line-height: 180%;" />[rsync]<span class="Apple-converted-space"> </span><br style="line-height: 180%;" />path = /cygdrive/f/rsync   (此处路径代表f:\rsync目录)<br style="line-height: 180%;" />read only = yes<br style="line-height: 180%;" />transfer logging = yes<br style="line-height: 180%;" />secrets file = /cygdrive/f/rsyncd.secrets<span class="Apple-converted-space"> </span><br style="line-height: 180%;" /><br style="line-height: 180%;" />(4)启动rsync服务<br style="line-height: 180%;" />打开“控制面板”－－＞“管理工具”－－＞“服务”：<br style="line-height: 180%;" />找到一个RsyncServer的服务，启动它<br style="line-height: 180%;" />到此server端配置结束，接下来配置client端 。<br style="line-height: 180%;" /><br style="line-height: 180%;" />CLIENT：<br style="line-height: 180%;" />(1)安装client端软件包：cwRsync_2.0.10_Installer.zip<br style="line-height: 180%;" />(2)打开cmd，执行如下操作，测试服务端是否正常 启动服务 了：<br style="line-height: 180%;" />cd C:\Program Files\cwRsync\bin<br style="line-height: 180%;" />telnet 192.168.0.201 22<br style="line-height: 180%;" />telnet 192.168.0.201 873<br style="line-height: 180%;" />若上述测试成功，此时可执行同步计划：<br style="line-height: 180%;" />rsync -vzrtopg &#8211;progress &#8211;delete 192.168.0.201::rsync /cygdrive/d/test<br style="line-height: 180%;" />或者是：<br style="line-height: 180%;" />rsync -vzrtopg &#8211;progress &#8211;delete 192.168.0.201：/cygdrive/d/rsync /cygdrive/d/test<br style="line-height: 180%;" />(此时，会提示输入密码，用户名为administrator，密码则为192.168.0.201的管理员登录密码)<br style="line-height: 180%;" />至此，安装配置windows到windows间的同步已经OK<br style="line-height: 180%;" />如果定时同步server上的文件，可将其加入任务计划中。<br style="line-height: 180%;" /><br style="line-height: 180%;" /><br style="line-height: 180%;" /><br style="line-height: 180%;" /><br style="line-height: 180%;" />二、windows作为server时与linux间的同步<br style="line-height: 180%;" />1、准备机器，此时使用windows作为server<br style="line-height: 180%;" />server&#8212;192.168.0.201 (windows)<br style="line-height: 180%;" />client&#8212;192.168.0.132 (linux)<br style="line-height: 180%;" /><br style="line-height: 180%;" />2、经过上文的操作，此时可简化操作了<br style="line-height: 180%;" />进入linux主机client同步server:<br style="line-height: 180%;" />#rsync -vzrtopg &#8211;progress &#8211;delete 192.168.0.201::rsync /test<span class="Apple-converted-space"> </span><br style="line-height: 180%;" /><br style="line-height: 180%;" /><br style="line-height: 180%;" /><br style="line-height: 180%;" />三、linux作为server时与windows间的同步<br style="line-height: 180%;" />1、准备机器，此时使用linux作为server<br style="line-height: 180%;" />server&#8212;192.168.0.132 (linux)<br style="line-height: 180%;" />client&#8212;192.168.0.202 (windows)<br style="line-height: 180%;" /><br style="line-height: 180%;" />2、安装与配置linux主机的rsync<br style="line-height: 180%;" />(1)查看linux上是否安装rsync:<br style="line-height: 180%;" />#rpm -qa|grep rsync<br style="line-height: 180%;" />若无则安装，或者使用tar编译安装<br style="line-height: 180%;" />#rpm -ivh rsync-2.6.8-3.1.rpm<br style="line-height: 180%;" /><br style="line-height: 180%;" />(2)打开rsync服务<br style="line-height: 180%;" />#chkconfig xinetd on<br style="line-height: 180%;" />#chkconfig rsync on<br style="line-height: 180%;" /><br style="line-height: 180%;" />(3)创建 rsyncd.conf 文件<br style="line-height: 180%;" />#touch /etc/rsyncd.conf<br style="line-height: 180%;" />#vi /etc/rsyncd.conf(内容如下：)<br style="line-height: 180%;" />uid = nobody<br style="line-height: 180%;" />gid = nobody<br style="line-height: 180%;" />max connections = 4<br style="line-height: 180%;" /><br style="line-height: 180%;" />[www]<br style="line-height: 180%;" />path = /www<br style="line-height: 180%;" />comment = BACKUP WWW<br style="line-height: 180%;" />ignore errors<br style="line-height: 180%;" />read only = yes<br style="line-height: 180%;" />list = no<br style="line-height: 180%;" />auth users = wwwuser<br style="line-height: 180%;" />hosts allow=192.168.0.202<br style="line-height: 180%;" />secrets file = /etc/wwwuser.pass<br style="line-height: 180%;" /><br style="line-height: 180%;" />(4)启动基于xinetd进程的rsync服务<br style="line-height: 180%;" />#/etc/init.d/xinetd start<br style="line-height: 180%;" /><br style="line-height: 180%;" />3、配置windows的rsync客户端<span class="Apple-converted-space"> </span><br style="line-height: 180%;" />(1)安装client端的rsync包<br style="line-height: 180%;" />(2)打开cmd,执行同步计划：<br style="line-height: 180%;" />cd C:\Program Files\cwRsync\bin<br style="line-height: 180%;" />rsync -vzrtopg &#8211;progress &#8211;delete root@192.168.0.132::www /cygdrive/d/test<br style="line-height: 180%;" />(此时须输入root用户的密码，就可进行同步了。)<br style="line-height: 180%;" /><br style="line-height: 180%;" />至此，全部配置完成。<br style="line-height: 180%;" /><br style="line-height: 180%;" />注：<br style="line-height: 180%;" />要使用加密的同步，可使用……<br style="line-height: 180%;" />rsync -e &#8216;ssh -p 2002&#8242; -vzrtopg &#8211;progress &#8211;delete root@192.168.0.132::www /cygdrive/d/test</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/642/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
