若是是使用安装文件,请查看官网文档,若是想要部署在已有的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