1.下载hadoop-2.5.1,存放根目录

目前创新互联公司已为上千余家的企业提供了网站建设、域名、网页空间、网站托管维护、企业网站设计、二道网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
2.通过tar -zxvf 包名 来进行解压


3.通过mv命令将解压后的hadoop包移动到/home下


4.修改hadoop-en.sh配置文件,添加jdk的安装目录,操作如下图所示




5.修改core-site.xml配置文件,添加namenode的配置信息


6.修改hdfs-site.xml配置文件,添加secondarynamenode的配置信息


7.修改slaves配置文件,添加datanode节点的配置信息


8.配置masters的secondarynode的主机名


9.将node1上的安装目录hadoop复制到其他的节点




10.将node1上的hosts文件复制到其他节点hosts文件所在目录/etc/hosts





11.将hadoop的安装目录添加到系统环境变量


12.将环境变量文件.bash_profile复制到其他节点




13.在node1上重新加载bash_profile

14.通过hdfs namenode -format格式化namenode节点(node1是namenode节点)


15.通过start-dfs.sh命令启动hadoop


16.通过http://192.168.2.136:50070/访问namenode的监控页面(192.168.2.136是node1)

17.通过http://192.168.2.137:50090访问secondarynamenode的监控页面(192.168.2.137是node2)

18.说明
安装前
检查jdk版本是否与hadoop匹配
检查节点时间是否一致,时间相差不要超过30秒
免密码登录是否设置
到此hadoop的简单安装与配置完成
笔者在这里使用的是虚拟机来安装这些环境
node1 安装namenode节点
node2 安装secondarynamenode节点
node3 安装datanode节点
node4 安装datanode节点
node5 安装datanode节点
网页标题:安装hadoop图文
标题URL:
http://mswzjz.cn/article/igpeoe.html