1. 修改hosts文件和永久主机名
因为BigInsights 3.0版本不像之前的版本可以直接用IP来增加节点,因此我们需要更改每台server的hosts文件和主机名:
vim/etc/hosts 在这个文件中增加如下的几行:
vim /etc/sysconfig/network 在这个文件中设置永久主机名:
2. install ksh
The server system do not contain the ksh shell, because IBM DB2 requires that Ksh be installed.
用chsh –l查看所有shell版本,发现没有ksh,于是用yum list \*ksh\*来查看availablepackage:
发现有ksh.x86_64安装包,于是再用yum install ksh进行安装。
成功。
3. shut down ipv6
ipv6 might causeproblem with MapReduce workloads.
查看server端ipv6的模块是否被加载:
或者用ifconfig| grep –i inet6来直接查看。
关闭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是否被关闭:
4. 集群时间同步:
前半部分:
首先设置time server,在此我将9.110.246.249设为timeserver。
date –s 03/11/2015
date –s 16:19:50
clock –w
hwclock –systohc
后两个命令是把设置的时间写到硬件时间中区,也就是CMOS里面的时间。
然后为了将9.110.246.249配置成time server,修改/etc/ntp.conf:
vim /etc/ntp.conf
注释掉restrict default kod nomodifynotrap nopeer noquery这一行
加入restrict 9.110.246.247 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和udp端口开放,因为这是ntp需要的端口:
/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
查看端口是否已经开放
/etc/init.d/iptables status
这样9.110.246.249就成为一台time server
后半部分:
现在我们配置9.110.246.247,
同样修改/etc/ntp.conf:vim /etc/ntp.conf
因为9.110.246.247不需要做time server,因此注释掉restrictdefault kod nomodify notrap nopeer noquery这一行
加入server 9.110.246.249这一句,用来和9.110.246.249 server同步。
这样时间同步就做好了,之后的默认操作是5mins和time server同步一次。
5. 更改/home的挂载分区
因为BigInsights在安装时,主节点在安装成功之前会产生一个默认的目录__biginsights_install,,它是存储于/home的这个目录下,而我们的这几台server的/home是挂载在/dev/mapper/VolGroup-lv_home这个分区下,这个分区目前的大小只有2G,在安装时,会产生cpwriting , no space left on the device 的错误。
明天是世上增值最快的一块土地,因它充满了希望