服务器 频道

SUSE Linux企业服务器搭建双机集群配置

  二、安装环境

  首先,需要准备两台PC服务器,每台服务器有两块网卡,其物理网络图如图1
 

安装环境

  图1 网络拓扑图

  虽然在YaST2控制中心里有"高可用性"图形化的配置向导,我们这里不介绍一个过程,中在讲述原理和方法,主要是基于命令行的配置方式。首先在PC服务器上安装SuSE Enterprise Linux 10.0系统,并将eth0配置为192.168.8.*网段,eth1配置为10.1.1.*网段,eth0链接对外的交换机,eth1用于两台机器的对连。

  修改/etc/hosts文件,修改内容如下:

  10.1.1.1 linux1

  10.1.1.2 linux2

  192.168.8.92 svr1

  192.168.8.93 svr2

  192.168.8.112 svr

  注意,10.1.1.*为心跳线IP地址,192.168.8.*为对外IP,192.168.8.112为浮动IP。并且,拷贝hosts文件到linux2上:

  #scp /etc/hosts 10.1.1.2:/etc

  同时,关闭不需要的服务如下:

  chkconfig -s alsasound off

  chkconfig -s nfs off

  chkconfig -s nfsboot off

  chkconfig -s portmap off

  chkconfig -s slpd off

  chkconfig -s smbfs off

  chkconfig -s setserial off

  chkconfig -s splash off

  chkconfig -s splash_early off

  chkconfig -s splash_late off

  chkconfig -s xdm off

  chkconfig -s fbset off

  chkconfig -s cups off

  chkconfig -s nscd off

  chkconfig -s random off

  最后,修改启动级别为3。找到/etc/inittab文件的如下几行:

  #The default runlevel is defined here id:5:initdefault:

  将其改为如下:

  #The default runlevel is defined here id:3:initdefault:

0
相关文章