如何在macOS下安裝geoserver

macOS 下的編譯包

 

若是是使用安裝文件,請查看官網文檔,若是想要部署在已有的tomcat服務下,請查看網頁壓縮包章節。 Web archive.html

An alternate way of installing GeoServer on OS X is to use the platform-independent binary. This version is a GeoServer web application bundled inside Jetty, a lightweight and portable application server. It has the advantages of working very similarly across all operating systems and is very simple to set up.java

 

Installation

  1. 確認已經安裝了JRE環境. GeoServer 須要 Java 8 環境, and the JRE supplied by OS X is not sufficient. For more information, please see the instructions for installing Oracle Java on OS X.web

    Note瀏覽器

     

    注意:Java 9 目前還不支持!tomcat

     

    For more information about Java and GeoServer, please see the section on Java Considerations.bash

  2. 在官方網站下載頁面 GeoServer Download page.app

  3. 選擇穩定版本 Stable.eclipse

  4. 選擇編譯包選項.ide

  5. 下載後解壓縮到你想要使用的位置網站

     

    建議使用該位置: /usr/local/geoserver.

  6. 經過命令行添加環境變量:

    echo "export GEOSERVER_HOME=/usr/local/geoserver" >> ~/.profile . ~/.profile
  7. 經過命令行給文件夾添加用戶權限:

    sudo chown -R <USERNAME> /usr/local/geoserver/
    

    其中 USER_NAME 是當前用戶的名稱

  8. 進入到安裝目錄,geoserver/bin 並執行 startup.sh 腳本:

    cd geoserver/bin sh startup.sh


    Warning

     

    If you encounter the following error during startup, you may have some invalid JAI jars from the default Mac Java install:

    java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI
    

    To fix this error, locate your Java extensions folder (Usually /System/Library/Java/Extensions and/or ~/Library/Java/Extensions), and delete the following jars:

    jai_codec-1.1.3.jar
    jai_core-1.1.3.jar
    jai_imageio-1.1.jar
    

    If you have upgraded your OS from an older version, you may not have permission to delete these jars. In this case, you will first need to disable System Integrity Protection.

  9. 打開瀏覽器輸入網址: http://localhost:8080/geoserver.

若是可以看到geoserver的logo,說明安裝成功。 ../_images/success.png

GeoServer installed and running successfully

 

 

關閉 GeoServer, 能夠經過關閉當前命令行窗口,也能夠經過執行bin文件夾下的 shutdown.sh 腳本.

 

卸載:

  1. 若是geoserver正在運行,請先中止。
  2. 刪除Geoserver所在的目錄文件夾。

 

原文地址:https://docs.geoserver.org/stable/en/user/installation/osx_binary.html

相關文章
相關標籤/搜索