`
megahh
  • 浏览: 16811 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

hdfs + hbase + zookeeper (cdh4.0.1)

阅读更多

由于mint安装virtualbox中,为了方便操作直接用root安装了.

sailor-mint ~ # ls *.gz
hadoop-2.0.0-cdh4.0.1.tar.gz  hbase-0.92.1-cdh4.0.1.tar.gz  zookeeper-3.4.3-cdh4.0.1.tar.gz
分别解压后放入/opt/ 并做好软链接

core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://sailor-mint:9000</value>
</property>
</configuration>

hdfs-site.xml
<configuration>
 <property>
 <name>dfs.replication</name>
 <value>1</value>
 </property>
 <property>
 <name>dfs.permissions.superusergroup</name>
 <value>root</value>
 </property>
 <property>
 <name>dfs.namenode.name.dir</name>
 <value>/opt/hdfsData/nn</value>
</property>
<property>
 <name>dfs.datanode.data.dir</name>
 <value>/opt/hdfsData/dn</value>
</property>
</configuration>

hbase-site.xml
<configuration>
<property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
</property>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://sailor-mint:9000/hbase</value>
  </property>
</configuration>

sailor-mint opt # cat zookeeper/conf/zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/opt/zkData   #(改动)
# the port at which the clients will connect
clientPort=2181
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

启动:
1 hdfs
hadoop namenode -format
start-dfs.sh
2 zookeeper
zkServer.sh start
3 hbase
start-hbase.sh
4 查看进程
sailor-mint opt # jps
4199 HRegionServer
3434 DataNode
4070 HMaster
3588 SecondaryNameNode
5014 Jps
3324 NameNode
3727 QuorumPeerMain
这里 3723 QuorumPeerMain 是 zookeeper 的进程,4070 HMaster 4199 HRegionServer 是 hbase的进程

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics