若是是使用安裝文件,請查看官網文檔,若是想要部署在已有的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
確認已經安裝了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
在官方網站下載頁面 GeoServer Download page.app
選擇穩定版本 Stable.eclipse
選擇編譯包選項.ide
下載後解壓縮到你想要使用的位置網站
建議使用該位置: /usr/local/geoserver
.
經過命令行添加環境變量:
echo "export GEOSERVER_HOME=/usr/local/geoserver" >> ~/.profile . ~/.profile
經過命令行給文件夾添加用戶權限:
sudo chown -R <USERNAME> /usr/local/geoserver/
其中 USER_NAME
是當前用戶的名稱
進入到安裝目錄,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.JAITo 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.jarIf 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.
打開瀏覽器輸入網址: http://localhost:8080/geoserver
.
若是可以看到geoserver的logo,說明安裝成功。![]()
GeoServer installed and running successfully
關閉 GeoServer, 能夠經過關閉當前命令行窗口,也能夠經過執行bin文件夾下的 shutdown.sh
腳本.
卸載:
原文地址:https://docs.geoserver.org/stable/en/user/installation/osx_binary.html