Nut开发环境搭建(虚拟机下hadoop0.20.2+zookeeper3.3.3+hbase0.90.2开发环境的搭建)

Nut开发环境搭建(虚拟机下hadoop0.20.2+zookeeper3.3.3+hbase0.90.2开发环境的搭建)

blog: http://www.blogjava.net/nianzai/

code: http://code.google.com/p/nutla/


一、安装
1、 安装虚拟机 Oracle VM VirtualBox4.0.4
2、 在虚拟机下安装 Red Hat 6.0
3、 安装jdk jdk-6u24-linux-i586.bin 安装路径为:/home/nianzai/jdk1.6.0_24
4、 安装hadoop hadoop-0.20.2.tar.gz 安装路径为:/home/nianzai/hadoop-0.20.2
5、 安装zookeeper zookeeper-3.3.3.tar.gz 安装路径为:/home/nianzai/zookeeper-3.3.3
6、 安装hbase hbase-0.90.2.tar.gz 安装路径为:/home/nianzai/hbase-0.90.2

二、配置
1、Linux配置
ssh-keygen –t rsa -P ''
cd .ssh
cp id_rsa.pub authorized_keys

/etc/hosts里增加 192.168.195.128 master
/etc/profile 里增加
export JAVA_HOME=/home/nianzai/jdk1.6.0_24
export PATH=$PATH:$JAVA_HOME/bin

2、hadoop配置
hadoop-env.sh
JAVA_HOME=/home/nianzai/jdk1.6.0._24

core-site.xml
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/nianzai/hadoop</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://master:9000</value>
</property>
</configuration>

hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>master:9001</value>
</property>
</configuration>

masters
master

sh hadoop namenode -format
sh start-all.sh
sh hadoop fs -mkdir input

3、zookeeper配置
zoo.cfg
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/home/nianzai/zkdata
clientPort=2181

sh zkServer.sh start

4、hbase配置
hbase-env.sh
export JAVA_HOME=/home/nianzai/jdk1.6.0_24
export HBASE_MANAGES_ZK=false

将hbase0.90.2 lib目录下hadoop-core-0.20-append-r1056497.jar删除,替换成hadoop0.20.2 下的hadoop-0.20.2-core.jar

hbase-site.xml
<configuration>
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://master:9000/hbase</value>
</property>
<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
</property>
<property>
    <name>hbase.master.port</name>
    <value>60000</value>
  </property>
<property>
      <name>hbase.zookeeper.quorum</name>
      <value>master</value>
</property>
</configuration>

regionservers
master

sh start-hbase.sh

你可能感兴趣的:(Nut开发环境搭建(虚拟机下hadoop0.20.2+zookeeper3.3.3+hbase0.90.2开发环境的搭建))