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

📄 1687.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
        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>实现四台Web服务器的负载均衡</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>集群的概念容易和一些概念(SMP 、NUMA、MPP、分布处理)相混淆,其主要区别在资源被共享和复制的级别不同。它们是按SMP、NUMA、MPP、集群、分布处理从最紧 密到最松散的排列。<br>
<br>
  SMP(多处理系统):这种系统是在一台计算机里有多个CPU,CPU之间的地位是平等的,它们共享内存空间和I/O设备。其工作方法是由操作系统负责将任务分解成多个并发进程,然后让其在不同的CPU上运行。<br>
<br>
  NUMA(非统一内存存取):这种系统可以让多处理计算机的CPU比SMP更高效地共享本地内存,CPU可以更快速地存取单一的内存区域,不过如需要也可以用间接方式存取其他区域的内存,这种方法是让某些CPU在给定范围的物理内存中有更大的优先使用权。<br>
<br>
  MPP(巨型并行处理):这种系统的节点都有自己的CPU,并有自己的专有资源。此种结构相对独立,但各个节点一般没有完全存取I/O的能力。<br>
<br>
  集群:集群系统是由独立的计算机组成,但有控制管理工具统一管理。<br>
<br>
  分布处理:它是比我们要构筑的集群系统更松散的连接,一般是任务在不同的地方完成,没有可以作为整体管理的单一实体。<br>
<br>
  以上的聚合方式有紧有疏,它们都有自己的适用范围,这里就不多说了,有兴趣可自己找些资料看,这里只是想让大家了解它所处的位置。<br>
<br>
  实现负载均衡的方法<br>
<br>
  集群的目的是共享和高效地利用资源,提供大型运算,提供负载均衡分配请求压力以及出现故障时能够进行切换实现高可用性。<br>
<br>
  限于篇幅,本文只对负载均衡的实现做些介绍(针对TurboLinux Cluster Server)。通过对相关软件的分析,实现集群负载的功能是通过流量管理实现的,具体有这样几种实现方法:直接路由(Direct forwarding)、网络地址转换(NAT)、隧道技术(Tunneling)。<br>
<br>
  直接路由(Direct forwarding)<br>
<br>
  当参与集群的计算机和作为控制管理的计算机在同一个网段时可以用此法,控制管理的计算机接收到请求包时直接送到参与集群的节点。优点是返回给客户的流量不经过控制主机,速度快开销少。<br>
<br>
网络地址转换(NAT)<br>
<br>
  这种方法可能大家较熟悉,地址转换器有能被外界访问到的合法IP地址,它修改来自专有网络的流出包的地址,外界看起来包是来自地址转换器本身,当外界包送到转换器时,它能判断出应该将包送到内部网的哪个节点。优点是节省IP地址,能对内部进行伪装;缺点是效率低,因为返回给请求方的流量经过转换器。<br>
<br>
  隧道技术(Tunneling)<br>
<br>
  这种方式是在集群的节点不在同一个网段时可用的转发机制,是将IP包封装在其他网络流量中的方法,为了安全的考虑,应该使用隧道技术中的VPN,也可使用租用专线。<br>
<br>
  集群所能提供的服务是基于TCP/IP的Web服务、Mail服务、News服务、DNS服务、Proxy服务器等等,下面我们将就具体的产品TurboLinux Cluster Server 来实现一个进行负载均衡集群系统,用于提供Web和FTP的服务。<br>
<br>
  四台服务器的负载均衡实例<br>
<br>
  所提供的服务:Web、FTP。<br>
<br>
  系统的实现目的:做一个较完善负载均衡的系统,以便能用到其中的较多的功能。<br>
<br>
  采用设备状况:使用四台服务器,其中3台装TurboLinux Cluster Server,1台安装Windows 2000 Sever。<br>
<br>
  系统安装<br>
<br>
  1.在两台服务器上安装TurboLinux, apache和wu-ftpd也要安装,因为集群要提供这种服务,安装完后重启,挂接光驱在目录/mnt/cdrom下,执 行./TLCS-install,然后按提示完全安装。<br>
<br>
  2.在一台服务器上安装Windows 2000 Server,要安装Internet Information Server 5.0。<br>
<br>
  系统配置<br>
<br>
  1.设置各台服务器的IP地址、子网掩码、路由等,调通网络,将一台TurboLinux服务器设置 成DNS服务器,使其能够正向解析和反向解析。服务器名此例为 pc1,域为test.com。<br>
<br>
  2.配置Cluster Server。执行Turbolinux clusteradmin,设置情况如下(注:箭头连接的是选单选项,箭头所指为下级选单,最后冒号后为设置情况)。<br>
<br>
ClusterServer Configuration→Cluster Services→Application Stability Agents:<br>
<br>
  (1)http为默认的服务,不用设置<br>
<br>
  (2)ftp----/usr/lib/ftpAgent<br>
<br>
  ClusterServer Configuration→Cluster Services→Service Settings:<br>
<br>
  (1)http,80:TCP,sticky<br>
<br>
  (2)ftp,21:TCP,ftp<br>
<br>
  ClusterServer Configuration→Servers Configuration:<br>
<br>
  (1) pc1 (pc1.test.com),direct,ping<br>
<br>
  (2) pc2 (pc2.test.com),direct,ping<br>
<br>
  (3) pc3 (pc3.test.com),direct,ping<br>
<br>
  (4) pc4 (pc4.test.com),direct,ping<br>
<br>
  ClusterServer Configuration→Advance Traffic Managers:<br>
<br>
  (1)Advance Traffic Manager System: pc1.test.com<br>
<br>
  (2)Advance Traffic Manager Setting: 默认值<br>
<br>
  ClusterServer Configuration→Virtual Severs:<br>
<br>
  (1)主机为:pc1.test.com<br>
<br>
  (2)sendmail:master@pc1.test.com<br>
<br>
  (3)Server pool name: ServerGroup1<br>
<br>
  ClusterServer Configuration→Globle Settings:<br>
<br>
  网络设置:netmask 255.255.255.0<br>
<br>
配置集群各接点<br>
<br>
  因为TurboLinux Cluster Server 本身能被工具自动同步,所以只需配置Windows 2000 Server:<br>
<br>
  开始→设置→控制面板→添加新硬件→下一步→添加/排除设备故障→添加新设备→否,我想从列表选择硬件→其他设备→Microsoft:Microsoft Loopback Adapter→完成。<br>
<br>
  桌面上右键单击“网上邻居”→属性→TCP/IP→设置IP地址、缺省网关,子网掩码(注:先设成:255.255.255.0)。<br>
<br>
  开始→运行→regedit→找到注册表中跟Microsoft Loopback Adapter相关的项,将子网掩码改成:255.255.255.255。<br>
<br>
  配置系统以便运行合适的服务、并配置适合控制管理器管理的配置,以便可在控制管理器中使用。<br>
<br>
  在管理选单中执行内容同步<br>
<br>
  选tlcs_content_sync,输入密码,将复制控制管理计算机中的服务内容。<br>
<br>
  在管理选单中执行设置同步<br>
<br>
  选tlcs_config_sync,输入密码,将复制控制管理计算机中的设置。<br>
<br>
  现在已经可以进入运行状态,可将客户端连接在服务器的交换机上,客户端可以请求Web和FTP服务,需要查看运行情况可以用控制台从https://pc1.test.com:910管理。<br>
<br>
  在计算机技术中集群负载平衡是自成体系的,目前它是一个热门技术也是一个高端应用,Internet/Intranet中使用集群负载平衡方案的地方十分广泛,尤其是大中型网站都难脱离这种技术,直接路由(Direct forwarding)、网络地址转换(NAT)、隧道技术(Tunneling)都会因需要而被采用。它在网络中的作用和被人们重视程度都是很高的,如果你也感兴趣的话,不妨也来试试。 
</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 + -