GeoMesa實踐教程(一):GeoMesa安裝

GeoMesa實踐教程(一):GeoMesa安裝

1、系統(tǒng)環(huán)境

主機 操作系統(tǒng)
master Ubuntu18.04
slave1 Ubuntu18.04
slave2 Ubuntu18.04

2、軟件環(huán)境

軟件 版本 版本兼容說明
GeoMesa 3.3.0 整體版本從GeoMesa倒推,GeoMesa安裝說明(https://www.geomesa.org/documentation/stable/user/hbase/install.html#install-hbase-geoserver)上提示了HBase的兼容版本2.X
GeoServer 2.17.3 GeoMesa對GeoServer版本是有要求的,可以看這個網(wǎng)站 https://www.geomesa.org/documentation/stable/user/geoserver.html
HBase 2.2.7 根據(jù)GeoMesa需要,找2.X版本就行
Hadoop 2.10.1 HBase介紹網(wǎng)站(https://hbase.apache.org/book.html)給出了HBase各版本與Hadoop版本兼容性,根據(jù)自己情況選擇就行(建議還是2系列)。
Zookeeper 3.7.0 就用我這個版本,或者3.4系列都可以,其他的沒試過

3、安裝

Hadoop、HBase、ZooKeeper安裝就不介紹了,Google上很多安裝介紹,這里著重說下GeoMesa的安裝。其實GeoMesa安裝非常簡單,總體來說分為三步:

  • 1、下載GeoMesa,解壓,然后把{GEOMESA_PATH}/bin添加到環(huán)境變量。

GeoMesa-HBase 3.3.0 下載地址: https://github.com/locationtech/geomesa/releases/download/geomesa-3.3.0/geomesa-hbase_2.11-3.3.0-bin.tar.gz

然后,把hbase的hbase-site.xml添加到{GEOMESA_PATH}/lib/geomesa-hbase-datastore_2.12-3.3.0.jar的根目錄下,有兩個辦法
1. 用zip軟件打開,然后添加進去
2. 執(zhí)行命令

zip -r {GEOMESA_PATH}/lib/geomesa-hbase-datastore_2.12-3.3.0.jar hbase-site.xml
按照GeoMesa的說法,有一些依賴可能是由于License原因,沒辦法直接提供,因此提供了一個工具下載:
 {GEOMESA_PATH}/bin/install-shapefile-support.sh
  • 2、在{GEOMESA_PATH}/dist/hbase下有一個geomesa-hbase-distributed-runtime-hbase2_2.12-3.3.0.jar文件(注意是HBase2),然后執(zhí)行命令:

    hdfs dfs -put {GEOMESA_PATH}/dist/hbase/geomesa-hbase-distributed-runtime-hbase2_2.12-3.3.0.jar /hbase/lib/
    
  • 3、配置GeoServer,這一步只要把依賴搞定就沒問題,主要是依賴的問題。

    1、GeoMesa提供了工具用來自動下載所需依賴(其實在 https://www.geomesa.org/documentation/stable/user/hbase/install.html#install-hbase-geoserver 這個網(wǎng)站上,GeoMesa已經(jīng)列出了所需的依賴,但是還是缺了一些,我這里列出我用的依賴,大家對號入座)

    • 修改{GEOMESA_PATH}/conf/dependencie
    hbase_install_version="2.2.7"
    hbase_thirdparty_install_version="2.2.1"
    hadoop_install_version="2.8.5"
    zookeeper_install_version="3.4.10"
    # required for hadoop - make sure it corresponds to the hadoop installed version
    guava_install_version="31.0-jre"
    
    • 執(zhí)行{GEOMESA_PATH}/bin/install-dependencies.sh

      2、把這個壓縮包{GEOMESA_PATH}/dist/gs-pluginsgeomesa-hbase-gs-plugin_2.12-3.3.0-install.tar.gz解壓到${GEOSERVER_PATH}/webapps/geoserver/WEB-INF/lib下面

       3、把下面這些依賴復(fù)制到${GEOSERVER_PATH}/webapps/geoserver/WEB-INF/lib下面,重啟Geoserver
  • commons-cli-1.2.jar
  • commons-configuration-1.6.jar
  • commons-io-2.5.jar
  • commons-logging-1.1.3.jar
  • hadoop-auth-2.8.5.jar
  • hadoop-common-2.8.5.jar
  • hadoop-hdfs-2.8.5.jar
  • hadoop-hdfs-client-2.8.5.jar
  • hadoop-mapreduce-client-core-2.8.5.jar
  • hbase-client-2.2.7.jar
  • hbase-common-2.2.7.jar
  • hbase-hadoop-compat-2.2.7.jar
  • hbase-mapreduce-2.2.7.jar
  • hbase-protocol-2.2.7.jar
  • hbase-protocol-shaded-2.2.7.jar
  • hbase-shaded-miscellaneous-2.2.1.jar
  • hbase-shaded-netty-2.2.1.jar
  • hbase-shaded-protobuf-2.2.1.jar
  • htrace-core4-4.1.0-incubating.jar
  • metrics-core-2.2.0.jar(新增)
  • metrics-core-3.2.6.jar
  • netty-3.6.2.Final.jar
  • netty-all-4.1.48.Final.jar
  • protobuf-java-2.5.0.jar
  • zookeeper-3.7.0.jar
  • zookeeper-jute-3.7.0.jar(新增)
  • curator-client-4.3.0.jar(新增)
  • curator-framework-4.3.0.jar(新增)
  • curator-recipes-4.3.0.jar(新增)
  • postgresql-42.2.14.jar(新增)
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容