如何在macOS下安裝geoserver


macOS 下的編譯包

 

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

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.

 

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.

    Note

     

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

     

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

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

  3. 選擇穩定版本 Stable.

  4. 選擇編譯包選項.

  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

 


免責聲明!

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



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