9、推送/etc/hosts文件
图1、“/etc/hosts” | “推送/etc/hosts”
图2、“提交”
图3、推送完成 | “关闭”
10、Hadoop集群所有节点上的手动操作10.1 创建hadoop数据存储目录
# mkdir -p /usr/hadoop/tmp
# chmod 777 /usr/hadoop/tmp
# chown hadoop.hadoop -R /usr/hadoop/
10.2设置hadoop命令可执行
#chmod 777 /usr/sbin/*
11、namenode格式化
[root@easy-master ~]# su - hadoop
[hadoop@easy-master ~]$ hadoop namenode -format
Warning: $HADOOP_HOME is deprecated.
13/05/07 13:36:33 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = easy-master.cs1cloud.internal/192.168.1.93
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 1.0.4
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0 -r 1393290; compiled by 'hortonfo' on Wed Oct 3 05:17:59 UTC 2012
************************************************************/
13/05/07 13:36:33 INFO util.GSet: VM type = 64-bit
13/05/07 13:36:33 INFO util.GSet: 2% max memory = 2.475 MB
13/05/07 13:36:33 INFO util.GSet: capacity = 2^18 = 262144 entries
13/05/07 13:36:33 INFO util.GSet: recommended=262144, actual=262144
13/05/07 13:36:33 INFO namenode.FSNamesystem: fsOwner=hadoop
13/05/07 13:36:33 INFO namenode.FSNamesystem: supergroup=supergroup
13/05/07 13:36:33 INFO namenode.FSNamesystem: isPermissionEnabled=true
13/05/07 13:36:33 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
13/05/07 13:36:33 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
13/05/07 13:36:33 INFO namenode.NameNode: Caching file names occuring more than 10 times
13/05/07 13:36:34 INFO common.Storage: Image file of size 112 saved in 0 seconds.
13/05/07 13:36:34 INFO common.Storage: Storage directory /usr/hadoop/tmp/dfs/name has been successfully formatted.
13/05/07 13:36:34 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at easy-master.cs1cloud.internal/192.168.1.93
************************************************************/
备注:EHM管理服务器考虑到安全因素,并不能进行namenode格式化,需要在集群master上手动执行
至此,hadoop集群配置完成。此前我没使用的是通用配置,如果集群中有些节点配置比较特殊,可以使用“节点配置”