hadoop+hbase+zookeeper配置
Hbase -version 0.90.6
Hadoop -version 0.20.203
tar zxvf mysql.tar.gz -C /home/aaa
ssh: localhost: Name or service not known 是/etc/hosts在作怪。在/etc/hosts 没有localhost的解析,127.0.0.1 localhost # must be added
使用env命令显示所有的环境变量
Unpack the downloaded Hadoop distribution. In the distribution, edit the file conf/hadoop-env.sh to define at least JAVA_HOME to be the root of your Java installation.
Bad connection to FS. command aborted. 重新格式化NameNode就行了,01.hadoop namenode -format
NameNode中FsImage文件存放的是整个文件系统的名字空间,包括数据块到文件的映射、文件的属性
./bin/start-hbase.sh
./bin/hbase shell
$source 环境变量文件名 让环境变量生效不用重启
cat /proc/version 查看系统版本
java.io.FileNotFoundException: /home/Hadoop/hadoop-0.21.0/bin/../logs/SecurityAuth.audit (Permission denied)
-------------------------
配置HBase,到了最后一步,jps下,发现主节点上HMaster没有启动,在HBase log里有下面异常:
。。。
FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
java.lang.NoClassDefFoundError: org/apache/commons/configuration/Configuration
。。。
Caused by: java.lang.ClassNotFoundException: org.apache.commons.configuration.Configuration
解决:从hadoop_home/lib下面cp一个commons-configuration-1.6.jar到hbase_home/lib下
---------------------------
还用hadoop目录下的hadoop-0.20.2-core.jar替换掉了hbase/lib目录下的hadoop-core-0.20-append-r1056497.jar ,否则会出现协议版本不一直的错误。
netstat -anp |grep 28754 查看端口状态
kill -9 28754 强制关闭端口进程
-------------------------------------
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
经试验后还是需要密码
ssh -vvv localhost
修改authorized_keys权限
chmod 644 ~/.ssh/authorized_keys
搞定..
--------------------------------
java.io.IOException: File /hbase/hbase.version could only be replicated to 0 nodes, instead of 1
datanode没有正常启动
配置core-site.xml如下
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/Hadoop/hadoop/data/${user.name}</value>
</property>
</configuration>
配置hdfs-site.xml如下
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/home/Hadoop/hadoop/data/hadoop/dfs/name</value>
</property>
</configuration>
解决了问题
------------------------------------
hadoop+hbase+zookeeper运行正常