IBM BigInsights 3.0.0.2 集群环境搭建

时间:2021-07-20 18:15:58

1. 改动hosts文件和永久主机名

由于BigInsights 3.0版本号不像之前的版本号能够直接用IP来添加节点,因此我们须要更改每台server的hosts文件和主机名:

vim/etc/hosts 在这个文件里添加例如以下的几行:

IBM BigInsights 3.0.0.2 集群环境搭建

vim /etc/sysconfig/network 在这个文件里设置永久主机名:

IBM BigInsights 3.0.0.2 集群环境搭建

2. install ksh

The server system do not contain the ksh shell, because IBM DB2 requires that Ksh be installed.

IBM BigInsights 3.0.0.2 集群环境搭建

用chsh –l查看全部shell版本号,发现没有ksh,于是用yum list \*ksh\*来查看availablepackage:

IBM BigInsights 3.0.0.2 集群环境搭建

发现有ksh.x86_64安装包,于是再用yum install ksh进行安装。

IBM BigInsights 3.0.0.2 集群环境搭建

成功。

3. shut down ipv6

ipv6 might causeproblem with MapReduce workloads.

查看server端ipv6的模块是否被载入:

IBM BigInsights 3.0.0.2 集群环境搭建

或者用ifconfig| grep –i inet6来直接查看。

IBM BigInsights 3.0.0.2 集群环境搭建

关闭IPv6,能够改动 /etc/hosts,把ipv6的那句本地主机名解析的凝视掉:

#::1 localhost localhost6 localhost6.localdomain6

并新建设定文件:/etc/modprobe.d/ipv6off.conf:

加入:

alias net-pf-10 off

options ipv6 disable=1

然后reboot后查看ipv6是否被关闭:

IBM BigInsights 3.0.0.2 集群环境搭建

4. 集群时间同步:

前半部分:

首先设置time server,在此我将9.110.***.**9设为timeserver。

date –s 03/11/2015

date –s 16:19:50

clock –w

hwclock –systohc

后两个命令是把设置的时间写到硬件时间中区,也就是CMOS里面的时间。

然后为了将9.110.***.**9配置成time server,改动/etc/ntp.conf:

vim /etc/ntp.conf

凝视掉restrict default kod nomodifynotrap nopeer noquery这一行

增加restrict 9.110.***.**7 mask255.255.255.255 nomodify notrap

增加 server 127.127.1.0

增加fudge 127.127.1.0 stratum 10

这两行是让本机的ntpd与本地硬件时间同步。

然后重新启动ntpd服务,service ntpd restart

chkconfig ntpd on 来设置开机自己主动启动ntpd服务

接下来改动iptables,将tcp和udpport开放,由于这是ntp须要的port:

/sbin/iptables -I INPUT -p tcp --dport 103 -j ACCEPT

/sbin/iptables -I INPUT -p udp --dport 103 -j ACCEPT

/etc/rc.d/init.d/iptables save

/etc/rc.d/init.d/iptables restart

查看port是否已经开放

/etc/init.d/iptables status

这样9.110.***.**9就成为一台time server

后半部分:

如今我们配置9.110.***.**7,

相同改动/etc/ntp.conf:vim /etc/ntp.conf

由于9.110.***.**7不须要做time server,因此凝视掉restrictdefault kod nomodify notrap nopeer noquery这一行

增加server 9.110.***.**9这一句,用来和9.110.***.**9 server同步。

这样时间同步就做好了,之后的默认操作是5mins和time server同步一次。

IBM BigInsights 3.0.0.2 集群环境搭建

5. 更改/home的挂载分区

由于BigInsights在安装时,主节点在成功安装之前会产生一个默认的文件夹__biginsights_install,它是存储于/home的这个文件夹下,而我们的这几台server的/home是挂载在/dev/mapper/VolGroup-lv_home这个分区下,这个分区眼下的大小仅仅有2G,在安装时,会产生cpwriting , no space left on the device 的错误。

IBM BigInsights 3.0.0.2 集群环境搭建

IBM BigInsights 3.0.0.2 集群环境搭建

解决此问题的方案有两个,一个是扩展磁盘分区容量,可是这样做会比較麻烦耗时。

还有一种方案是:

备份并删除/home,或者将/home重命名,然后再cd /进入到[root@nodexx /]。

接着在当前文件夹下进行/home的新建,mkdir /home。在此我们的/home便挂载到了/dev/mapper/VolGroup-lv_root分区下。当然在此,为了让其永久生效,而不会在重新启动后恢复原来的挂载设置,我们还须要再更改一个文件,vim /etc/fstab

IBM BigInsights 3.0.0.2 集群环境搭建

凝视掉这一行保存就可以。

在此,我们在此查看分区情况:

IBM BigInsights 3.0.0.2 集群环境搭建

已经没有了/dev/mapper/VolGroup-lv_home分区。

注:第1,2,3,步以及第4步的后半部分需为每一个节点进行操作,第5步仅为安装节点进行操作。

经过以上的前期准备工作后,我们就能够进行安装,之后得到successful的结果:

IBM BigInsights 3.0.0.2 集群环境搭建