hadoop分布式安装过程
一、安装准备及环境说明
1、下载hadoop-1.2.1,地址:http://apache.spinellicreations.com/hadoop/common/stable/hadoop-1.2.1-bin.tar.gz
2、JDK版本:jdk1.6.0_35 (64位,必须是1.6)
3、操作系统:CentOS 6.4 64位
4、三台机器,10.108.102.5(master,hbase1),10.108.102.151(slave,hbase2),10.108.103.89(slave,hbase3)
二、安装操作
1、拷贝以上文件到Linux的“/home”目录下。同时新建目录“/home/songtao”。
2、安装JDK,此步省略...
3、解压hdaoop到/jz目录下。tar -zxvf hadoop-1.2.1-bin.tar.gz -C /home/songtao
4、配置 hbase1 机器可以通过SSH直接访问 hbase2 和 hbase3 。
在hbase1上执行以下操作:
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
直接回车,完成后会在~/.ssh/生成两个文件:id_dsa 和id_dsa.pub。这两个是成对出现,类似钥匙和锁。再把id_dsa.pub 追加到授权key 里面(当前并没有authorized_keys文件):
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
完成后可以实现无密码登录本机:
$ ssh localhost
把hbase1上的id_dsa.pub 文件追加到hbase2和hbase3的authorized_keys 内( 以10.108.102.151节点为例):
a. 拷贝hbase1的id_dsa.pub文件:
$ scp id_dsa.pub hbase2:/root/
b. 登录hbase2,进入/root目录执行:
$ cat id_dsa.pub >> .ssh/authorized_keys
之后可以在hbase1上不输入密码直接访问hbase2 ,同样方式配置无密码登录hbase3。
同样方法配置hbase2 hbase3的对其他机器无密码登录。
5、修改/home/songtao/hadoop-1.2.1/conf/hadoop-env.sh文件的环境变量:
# The java implementation to use. Required.
export JAVA_HOME=/home/songtao/jdk1..0_35
export HADOOP_PID_DIR=/home/songtao/hadoop-1.2./pids
6、修改/home/songtao/hadoop-1.2.1/conf/core-site.xml配置文件,内容如下:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop_tmp</value>
<description>A base for other temporary directories.</description>
</property> <property>
<name>fs.default.name</name>
<value>hdfs://hbase1:9000</value>
<description>The name of the default file system. A URI whose
scheme and authority determine the FileSystem implementation. The
uri's scheme determines the config property (fs.SCHEME.impl) naming
the FileSystem implementation class. The uri's authority is used to
determine the host, port, etc. for a filesystem.</description>
</property> </configuration>
7、修改/home/songtao/hadoop-1.2.1/conf/hdfs-site.xml配置文件,内容如下:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<configuration>
<property>
<name>dfs.name.dir</name>
<value>${hadoop.tmp.dir}/dfs/name</value>
<description>Determines where on the local filesystem the DFS name node
should store the name table(fsimage). If this is a comma-delimited list
of directories then the name table is replicated in all of the
directories, for redundancy. </description>
</property> <property>
<name>dfs.data.dir</name>
<value>/home/songtao/hadoop-1.2.1/data</value>
<description>Determines where on the local filesystem an DFS data node
should store its blocks. If this is a comma-delimited
list of directories, then data will be stored in all named
directories, typically on different devices.
Directories that do not exist are ignored.
</description>
</property> <property>
<name>dfs.replication</name>
<value>2</value>
<description>Default block replication.
The actual number of replications can be specified when the file is created.
The default is used if replication is not specified in create time.
</description>
</property>
</configuration>
8、修改/home/songtao/hadoop-1.2.1/conf/mapred-site.xml配置文件,内容如下:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>hbase1:9001</value>
<description>The host and port that the MapReduce job tracker runs
at. If "local", then jobs are run in-process as a single map
and reduce task.
</description>
</property>
</configuration>
9、修改ect/hosts配置文件,内容如下:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
10.108.102.5 hbase1
10.108.102.151 hbase2
10.108.103.89 hbase3
10、修改/ect/profile配置文件,在末尾追加以下内容,并输入source/etc/profile使之生效:
export JAVA_HOME=/usr/java/jdk1..0_35
export JRE_HOME=/usr/java/jdk1..0_35/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/home/songtao/hadoop-1.2.
export PATH=$HADOOP_HOME/bin:$PATH
11、将/home/songtao/hadoop-1.2.1拷贝到hbase2和hbase3对应的目录下。将/ect/profile和/etc/hosts也拷贝到hbase2和hbase3机器上。注意profile需要做生效操作。
$ source /etc/profile
三、格式化分布式文件系统hadoop
在名称节点的hadoop-1.1.2 目录下运行以下命令,出现sucessfully formatted表明格式化成功了
$ bin/hadoop namenode  -format
四、启动/停止hadoop
1、通过shell脚本启动hadoop。
$ sh /home/songtao/hadoop-1.2./bin/start-all.sh
或者分别启动
$ sh /home/songtao/hadoop-1.2./bin/start-dfs.sh
$ sh /home/songtao/hadoop-1.2./bin/start-mapred.sh
2、停止hadoop
$ sh /jz/hadoop-1.2./bin/stop-all.sh
五、判断是否成功
在名称节点和数据节点上分别 运行 /home/songtao/jdk1.6.0_35/bin/jps命令(查看与java有关的进行信息),出现下图几个进程表示安装成功!

hadoop分布式安装过程的更多相关文章
- hadoop分布式安装教程(转)
from:http://www.cnblogs.com/xia520pi/archive/2012/05/16/2503949.html 1.集群部署介绍 1.1 Hadoop简介 Hadoop是Ap ...
- HBase - 伪分布式安装过程
环境 - hadoop - 没有zookeeper(用hbase自带的zookeeper,当然后期我会改用独立的zookeeper) HBase介绍 参考:hbase是什么? hbase下载 地址:h ...
- Hadoop分布式安装
一.安装准备 1.下载hadoop,地址:http://hadoop.apache.org/,下载相应版本 2.下载JDK版本:Hadoop只支持1.6以上,地址:ht ...
- hadoop分布式安装部署详细视频教程(网盘附配好环境的CentOS虚拟机文件/hadoop配置文件)
参考资源下载:http://pan.baidu.com/s/1ntwUij3视频安装教程:hadoop安装.flvVirtualBox虚拟机:hadoop.part1-part5.rarhadoop文 ...
- hadoop 分布式安装
一.虚拟机安装centos7需要显示IPv4地址时设置 修改ip addr 中显示ipv4 修改 ONBOOT=no 为 ONBOOT=yes, 同时需要添加HWADDR=00:0c:29:c8:b6 ...
- hadoop分布式安装及其集群配置笔记
各机器及角色信息: 共10台机器,hostname与ip地址映射在此不做赘述.此为模拟开发环境安装,所以不考虑将NameNode和SecondaryNameNode安装在同一台机器. 节点 角色 na ...
- Cloudera’s Distribution Including Apache Hadoop(CDH)安装过程
文档地址:https://www.cloudera.com/documentation.html https://www.cloudera.com/documentat ...
- hadoop分布式安装部署具体视频教程(网盘附配好环境的CentOS虚拟机文件/hadoop配置文件)
參考资源下载:http://pan.baidu.com/s/1ntwUij3视频安装教程:hadoop安装.flvVirtualBox虚拟机:hadoop.part1-part5.rarhadoop文 ...
- Hadoop之——分布式集群安装过程简化版
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/46352315 1.hadoop的分布式安装过程 1.1 分布结构 主节点(1个,是 ...
随机推荐
- IIS 之 HTTP 错误 403.14 - Forbidden
错误如下图所示: 其实,这个提示下面已经交代了怎么解决问题,现在告诉大家具体的详细步骤. 方法一:配置" 默认文档 " 方法二:启用" 目录浏览 "
- structs 2 学习总结(一)
转发请注明出处 1.页面传值. 传值 前台 <s:form action="login1">//action 名字 需要在structs配置 用户<s:tex ...
- Handler发送消息
Handler发送消息小结 字数283 阅读210 评论0 喜欢1 obtainMessage()得到一个Message对象. 创建一个Message然后发送是这么写的: Message msg = ...
- 【阿里云产品公测】开放搜索服务 opensearch java jdk 应用体验之 机器人聊天
作者:阿里云用户啊里新人 需求:基本实现智能聊天! 最近在开发一款机器人,希望实现基本的聊天功能,词库是有的,但是如果是做完全匹配这个出来的效果很悲催, 比如词库:你好,回答是:哈哈,很好啊. 如 ...
- 【Android 界面效果32】ImageView中XML属性src和background的区别
background会根据ImageView组件给定的长宽进行拉伸,而src就存放的是原图的大小,不会进行拉伸. src是图片内容(前景),bg是背景,可以同时使用. 此外:scaleType只对sr ...
- 《MFC游戏开发》笔记五 定时器和简单动画
本系列文章由七十一雾央编写,转载请注明出处. http://blog.csdn.net/u011371356/article/details/9332377 作者:七十一雾央 新浪微博:http:// ...
- 常用 CSS 中文字体 Unicode 编码表
为什么要在CSS中设置字体用字体 Unicode 编码 在 CSS 中设置字体名称,直接写中文是可以的.但是在文件编码(GB2312.UTF-8 等)不匹配时会产生乱码的错误. 为此,在 CSS直接使 ...
- [转]oracle 11g 忘记 默认用户密码
本文转自:http://blog.csdn.net/huangbiao86/article/details/6595052 首先启动sqlplus 输入用户名:sqlplus / as sysdba ...
- css隐藏元素display:none,opacity:0;filter:alpha(opacity=0-100;,visibility:hidden的区别
在CSS中,让元素隐藏(指屏幕范围内肉眼不可见)的方法很多,有的占据空间,有的不占据空间:有的可以响应点击,有的不能响应点击.我们一般有三种方式:display:none, opacity:0;fil ...
- HTML5游戏开发,剪刀石头布小游戏案例
剪刀石头布,非常可爱的小游戏,相信大家都非常的怀念这款小游戏,小时候也玩过很多次,陪伴着我的童年的成长,现在是不是还会玩一下,剪刀石头布游戏的规则我们都知道是:剪刀剪布,石头砸剪刀,布包石头.跟朋友. ...