windows下安裝hbase


  因hbase是在linux或者是在unix環境下運行的。所以在windows環境下安裝hbase,需要先安裝一個可以虛擬unix或者linux的工具。然后通過這個工具虛擬的虛擬機來啟動和訪問hbase。在這里使用的是cygwin。

1.安裝cygwin

在這個頁面選擇“install from Local Directory”。

 

2.安裝hbase

1.將“hbase-1.2.6-bin.tar.gz”解壓

2.配置hbase-1.2.6\conf\hbase-env.sh

         這兩個變量配置的值中前面的“/cygdrive/”是固定值。是cygwin啟動后所虛擬的虛擬機的跟目錄。后面的路徑則是windows下的絕對路徑,如果是在windows下的地址是“C:\Program Files\Java\jdk1.7.0_80\”,則在cygwin虛擬機下訪問的地址則為“/cygdrive/c/Program Files/Java/jdk1.7.0_80/”。

3.配置hbase-1.2.6\conf\hbase-site.xml

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!--

/**

 *

 * Licensed to the Apache Software Foundation (ASF) under one

 * or more contributor license agreements.  See the NOTICE file

 * distributed with this work for additional information

 * regarding copyright ownership.  The ASF licenses this file

 * to you under the Apache License, Version 2.0 (the

 * "License"); you may not use this file except in compliance

 * with the License.  You may obtain a copy of the License at

 *

 *     http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an "AS IS" BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 */

-->

 

<configuration>

         <property> 

                   <name>hbase.rootdir</name> 

                   <value>/cygdrive/C/cygwin64/tmp/hsperfdata_asus/hbase</value> 

         </property> 

         <property> 

                   <name>hbase.tmp.dir</name> 

                   <value>/cygdrive/C/cygwin64/tmp/hsperfdata_asus</value> 

         </property>    

         <property> 

                   <name>hbase.zookeeper.quorum</name> 

                  <value>127.0.0.1</value>

         </property>

</configuration>

4.基本的shell命令。啟動cygwin。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM