标签:
以上过程略,可参考ubuntu下安装hadoop一文。
tar -xzvf hadoop-2.6.0.tar.gz /Users/hadoop
hadoop-env.sh中加入JAVA_HOME路径:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
core-site.xml配置如下:
<configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/Users/hadoop/hadoop-2.6.0/tmp</value> </property> </configuration>
mapred-site.xml配置如下:
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
hdfs-site.xml配置如下:
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>/Users/hadoop/hadoop-2.6.0/tmp/dfs/name</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/Users/hadoop/hadoop-2.6.0/tmp/dfs/data</value> </property> </configuration>
yarn-site.xml配置如下:
<configuration> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> <property> <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name> <value>org.apache.hadoop.mapred.ShuffleHandler</value> </property> </configuration>
打开/etc/profile加入以下内容:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home export HADOOP_HOME=/Users/hadoop/hadoop-2.6.0 export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
hdfs namenode -format
start-all.sh
安装正确的话,此时应该有以下5个java线程:
NameNode
DataNode
SecondaryNameNode
NodeManager
ResourceManager
在浏览器中输入localhost:50070可以查看hadoop集群概述
tar -xzvf hbase-1.0.1.1-bin.tar.gz /Users/hadoop
hbase-env.sh配置如下:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home export HBASE_MANAGES_ZK=true
hbase-site.xml配置如下:
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://localhost:9000/hbase</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.tmp.dir</name> <value>/Users/hadoop/hbase-1.0.1.1/tmp</value> </property> <property> <name>zookeeper.session.timeout</name> <value>120000</value> </property> </configuration>
首先启动hadoop,然后启动hbase
start-all.sh start-hbase.sh
安装正确的话,应该有以下3个hbase相关线程:
HMaster
HRegionServer
HQuorumPeer
1)hadoop官网提供的安装包是32位的,安装到64位机器上会出现“
mac下安装伪分布hadoop2.6.0和hbase1.0.1.1
标签:
原文地址:http://www.cnblogs.com/yougzhao/p/4778953.html