⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1693.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
              <A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
              <font color="#FF6699">&gt;&gt;</font>
<A href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</A>                 | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
            </TD>
          <TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 
        border=0></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff 
        border=0>
         <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
              
              <TR>
                <TD vAlign=top align=middle width="60%">
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                  background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
                    <TBODY>
                    <TR>
                        <TD vAlign=top width="80%"> 
                          <DIV align=center>
                        <FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
                            </FORM>
                        <TABLE cellSpacing=0 cellPadding=0 width="95%" 
                          border=0><TBODY>
                          <TR>
                            <TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif" 
                          height=30></TD></TR></TBODY></TABLE>
                        <TABLE cellSpacing=0 cellPadding=3 width="95%" 
                        align=center border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                      <TD vAlign=top> 
<p><FONT class=normalfont><B><font color=blue>Linux下实现集群负载均衡</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br>集群的目的就是共享和高效地利用资源,提供大型运算,提供负载均衡分配,以及出现故障时能够进行切换,以实现高可用性。<br>
<br>
集群原理<br>
<br>
<br>
集群系统包括集群节点和集群管理器两部分。集群节点有时简称为节点、服务器或服务器节点,是提供处理资源的系统,它进行集群的实际工作。一般来讲,它必须进行配置才能成为集群的一部分,也必须运行集群的应用软件。应用软件可以是专用于集群的软件,也可以是设计用于分布式系统的标准软件。集群管理器则是将节点捆绑在一起,以构成单一系统外观的逻辑结构,它用于将任务分解到所有的节点。<br>
<br>
集群因多种不同的原因而有着不同的类型,建立集群的最直接原因是共享CPU资源,在多个机器之间平衡负载,获得更多的系统可靠性,或在主机失败时提供后备系统(切换)。<br>
<br>
通过对相关软件的分析,实现集群负载的功能是通过流量管理实现的,具体有以下几种实现方法:直接路由(Direct Forwarding)、网络地址转换(NAT)和隧道技术(Tunneling)。<br>
<br>
直接路由(Direct Forwarding)是当参与集群的计算机和作为控制管理的计算机在同一个网段时可以使用此法。控制管理的计算机接收到请求包时,直接送到参与集群的节点。它的优点是返回给客户的流量不经过控制主机,速度快、开销少。<br>
<br>
可能大家比较熟悉网络地址转换(NAT)这种方法。地址转换器有能被外界访问到的合法IP地址,它修改来自专有网络的流出包的地址,外界看起来包是来自地址转换器本身。当外界包送到转换器时,它能判断出应该将包送到内部网的哪个节点。它的优点是节省IP地址,能对内部进行伪装;缺点是效率低,因为返回给请求方的流量要经过转换器。<br>
<br>
隧道技术(Tunneling)这种方式是集群的节点不在同一个网段时采用的转发机制,是将IP包封装在其它网络流量中。从安全角度考虑,应该使用隧道技术中的VPN,也可使用租用专线。<br>
<br>
集群所能提供的服务是基于TCP/IP的Web服务、Mail服务、News服务、DNS服务和Proxy服务器等。下面我就以一个具体的产品TurboLinux Cluster Server 来实现一个负载均衡集群系统,用于提供Web和FTP服务。<br>
<br>
规划<br>
<br>
<br>
1.提供的服务:Web、FTP。<br>
<br>
2.做一个较完善的负载均衡系统,以便能用到其中较多的功能。<br>
<br>
3.使用4台服务器,其中3台安装TurboLinux Cluster Server,1台安装Windows 2000 Sever 。<br>
<br>
安装<br>
<br>
<br>
1.在3台服务器上安装Turbo Linux,还需要安装Apache和wu-ftpd,因为集群要提供这种服务。安装完成后重启机器,挂接光驱在目录/mnt/cdrom下,执行./TLCS-install,然后按提示完全安装。<br>
<br>
2.在1台服务器上安装Windows 2000 Server,还要安装Internet Information Server 5.0。<br>
<br>
配置集群管理器<br>
<br>
<br>
1.设置各台服务器的IP地址、子网掩码、路由等,调通网络,并将1台TurboLinux服务器设置成DNS服务器,使其能够正向解析和反向解析。此例服务器名为pc1,域为test.com。<br>
<br>
2.配置Cluster Server。执行Turbolinuxclusteradmin,设置情况如下(连字符连接的是选单选项或其下级选单,冒号后为设置情况):<br>
<br>
(1)ClusterServer Configuration-Cluster Services-Application Stability Agents:<br>
<br>
◆ http为默认的服务,不用设置。<br>
<br>
◆ ftp:/usr/lib/ftpAgent。<br>
<br>
(2)ClusterServer Configuration--Cluster Services--Service Settings:<br>
<br>
◆ http,80:TCP,sticky。<br>
<br>
◆ ftp,21:TCP,ftp。<br>
<br>
(3)ClusterServer Configuration--Servers Configuration:<br>
<br>
◆ pc1 (pc1.test.com),direct,ping。<br>
<br>
◆ pc2 (pc2.test.com),direct,ping。<br>
<br>
◆ pc3 (pc3.test.com),direct,ping。<br>
<br>
◆ pc4 (pc4.test.com),direct,ping。<br>
<br>
(4)ClusterServer Configuration--Advance Traffic Managers:<br>
<br>
◆ Advance Traffic Manager System:pc1.test.com。<br>
<br>
◆ Advance Traffic Manager Setting: 默认值。<br>
<br>
(5)ClusterServer ConfigurationàVirtual Severs:<br>
<br>
◆ 主机为:pc1.test.com。<br>
<br>
◆sendmail:master@pc1 .test.com。<br>
<br>
◆ Server pool name: Server Group1。<br>
<br>
(6)ClusterServer ConfigurationàGloble Settings:<br>
<br>
网络设置:netmask 255.255.255.0。<br>
<br>
配置集群各节点<br>
<br>
<br>
1.配置Windows 2000 Server节点<br>
<br>
因为TurboLinux Cluster Server 本身能被工具自动同步,所以只要配置Windows 2000 Server即可。<br>
<br>
(1)开始→设置→控制面板→添加新硬件→下一步→添加/排除设备故障→添加新设备→否,再从列表选择硬件→其它设备→Microsoft:Microsoft Loopback Adapter→完成。<br>
<br>
(2)在桌面上单击鼠标右键选择网上邻居→属性→TCP/IP,设置IP地址、缺省网关、子网掩码(先设成 255.255.255.0)。<br>
<br>
(3)开始→运行→regedit→找到注册表中与Microsoft Loopback Adapter相关的项,将子网掩码改成 255.255.255.255。<br>
<br>
(4)配置系统运行合适的服务,并配置适合集群管理器管理的配置,以便可在控制管理器中使用。<br>
<br>
2.配置TurboLinux Cluster Server节点<br>
<br>
(1)在管理菜单中选tlcs_content _sync执行内容同步,输入将要配置的节点机密码,将复制集群管理器中的服务内容到节点。<br>
<br>
(2)在管理菜单中选择tlcs_ config _sync执行设置同步,输入将要配置的节点机密码,复制集群管理器中的设置内容到节点。<br>
<br>
到此,我们已经可以在集群管理器PC1上看到运行状态,可将客户端连在接服务器的交换机上,客户端可以请求Web和FTP服务。如果想看运行情况还可以从集群管理器控制台使用https://pc1.test.com:910进行管理。<br>
<br>
在计算机技术中,集群负载平衡是目前一个热门技术,也是一个高端应用。Internet/Intranet中使用集群负载平衡方案十分广泛,尤其是大中型网站都难离这种技术。直接路由、网络地址转换、隧道技术会根据应用需要而被采用。<br>
[返回列表]
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -