编辑完保存退出
vi hadoop-1.0.0/conf/masters (配置hadoop 系统里面主机器名)输入以下
nodename
编辑完保存退出
启动hadoop 时候会根据salves 副本机器名去ssh 登陆其他电脑启动副本程序,我们需要配置无密码输入登录
不会的问谷歌.搜索 "ssh 无密码 登陆". 有很多教程,如果不配置的话。每次都要输入登录密码
输入 hadoop-1.0.0/bin/start-all.sh
starting namenode, logging to /home/hadoop/hadoop-1.0.0/libexec/../logs/hadoop-hadoop-namenode-localhost.localdomain.out
datanode1: starting datanode, logging to /home/hadoop/hadoop-1.0.0/libexec/../logs/hadoop-hadoop-datanode-localhost.localdomain.out
starting jobtracker, logging to /home/hadoop/hadoop-1.0.0/libexec/../logs/hadoop-hadoop-jobtracker-localhost.localdomain.out
datanode1: starting tasktracker, logging to /home/hadoop/hadoop-1.0.0/libexec/../logs/hadoop-hadoop-tasktracker-localhost.localdomain.out
--------------------------------------吃饭分界线----------------------------------------------------
hbase官方主页下载hbase.0.20.1版本(找不到下载可以点击这里寻找)
cd /home/hadoop
wget http://labs.mop.com/apache-mirror/hbase/hbase-0.92.1/hbase-0.92.1.tar.gz
tar zxvf hbase-0.92.1.tar.gz
编辑需要导入的环境变量vi hbase-0.92.1/conf/hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
export HBASE_HOME=/home/hadoop/hbase-0.92.1
export HBASE_CLASSPATH=${HBASE_HOME}/bin/hbase
export HBASE_MANAGES_ZK=true
编辑完保存退出
vi hbase-0.92.1/conf/hbase-site.xml 输入以下
hbase.rootdir
hdfs://nodename:7070/hbase
The directory shared by RegionServers.
dfs.replication
1
The replication count for HLog and HFile storage. Should not be greater than HDFS datanode count.
hbase.zookeeper.quorum
datanode1
The directory shared by RegionServers.
hbase.zookeeper.property.dataDir
/home/hadoop/zookeeper
Property from ZooKeeper's config zoo.cfg.The directory where the snapshot is stored.
hbase.cluster.distributed
true
The mode the cluster will be in. Possible values are false: standalone and pseudo-distributed setups with managed Zookeeper true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
hbase.master.dns.interface
eth0
The name of the Network Interface from which a master
should report its IP address.
hbase.master.dns.nameserver
192.168.109.130
The host name or IP address of the name server (DNS) which a master should use to determine the host name used for communication and display purposes.