1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
[grid@hadoop4 lib]$
pwd
/home/grid/hbase-1
.0.0
/lib
[grid@hadoop4 lib]$ vim f.sh
find
-name
"hadoop*jar"
|
sed
's/2.5.1/2.5.2/g'
|
sed
's/\.\///g'
> f.log
rm
.
/hadoop
*jar
cat
.
/f
.log |
while
read
Line
do
find
/home/grid/hadoop-2
.5.2 -name
"$Line"
|
xargs
-i
cp
{} ./
done
rm
.
/f
.log
[grid@hadoop4 lib]$
chmod
u+x f.sh
[grid@hadoop4 lib]$ .
/f
.sh
[grid@hadoop4 lib]$
find
-name
'hadoop*jar'
.
/hadoop-yarn-api-2
.5.2.jar
.
/hadoop-mapreduce-client-app-2
.5.2.jar
.
/hadoop-common-2
.5.2.jar
.
/hadoop-mapreduce-client-jobclient-2
.5.2.jar
.
/hadoop-mapreduce-client-core-2
.5.2.jar
.
/hadoop-yarn-server-nodemanager-2
.5.2.jar
.
/hadoop-hdfs-2
.5.2.jar
.
/hadoop-yarn-common-2
.5.2.jar
.
/hadoop-mapreduce-client-shuffle-2
.5.2.jar
.
/hadoop-auth-2
.5.2.jar
.
/hadoop-mapreduce-client-common-2
.5.2.jar
.
/hadoop-yarn-client-2
.5.2.jar
.
/hadoop-annotations-2
.5.2.jar
.
/hadoop-yarn-server-common-2
.5.2.jar
|
OK,jar 包替换成功;hbase/lib 目录下还有个 slf4j-log4j12-XXX.jar,在机器有装hadoop时,由于classpath中会有hadoop中的这个jar包,会有冲突,直接删除掉
1
|
[grid@hadoop4 lib]$
rm
`
find
-name
'slf4j-log4j12-*jar'
`
|
5.修改配置文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<
property
>
<
name
>hbase.rootdir</
name
>
<
value
>hdfs://hadoop4:9000/hbase</
value
>
</
property
>
<
property
>
<
name
>hbase.cluster.distributed</
name
>
<
value
>true</
value
>
</
property
>
<
property
>
<
name
>hbase.tmp.dir</
name
>
<
value
>/home/grid/hbase-1.0.0/tmp</
value
>
</
property
>
<
property
>
<
name
>hbase.zookeeper.quorum</
name
>
<
value
>hadoop4,hadoop5,hadoop6</
value
>
</
property
>
<
property
>
<
name
>hbase.zookeeper.property.dataDir</
name
>
<
value
>/home/grid/hbase-1.0.0/zookeeper</
value
>
</
property
>
|
创建目录
[grid@hadoop4 hbase-1.0.0]$ mkdir tmp