官术网_书友最值得收藏!

Installing required components

Before you can use GeoServer on your machine, you need to install some required pieces of software. GeoServer is a Java application; therefore, one of the most important things you need to ensure is that a Java virtual machine is working on your machine.

There are two main packages of Java. Depending on what you are planning to do with Java, you may want to install a JDK (Java Development Kit) or JRE (Java Runtime Environment).

The former enables you to compile Java code, while the latter has all you need to run most Java applications. Starting from release 2.0, GeoServer does not need a full JDK installation, and you can go safely with JRE. The JDK is only required if you are planning to write and compile Java code. This is the case if you want to modify the GeoServer source code, to fix code, or add functionalities.

This book will not cover developing Java code, but, in this case, you will need more than a Java JDK. You need to set up a full development environment to properly code and debug the GeoServer source code. You may find a lot of useful information in the developer manual at http://docs.geoserver.org/latest/en/developer/ .

The current version of GeoServer requires Java 8 (see the last paragraph in this chapter for details about the release's schedule). Keep in mind that Java 9 is not supported, it may work on it, but you will not get support for any trouble you will find while using it.

In the 90s, Sun Microsystems started the development of Java. It has developed each new release until it merged into Oracle Corporation. While Oracle did not change the Java license to a commercial one, there are some license issues preventing Oracle Java from being available on Linux repositories, while you can obtain it directly from Oracle online resources.

In the current releases of Linux Mint, you will find OpenJDK already installed in the desktop edition; in the server, you need to choose it during setup. In the past releases, GeoServer was not intensively tested on OpenJDK; today, it has been known to work adequately with no issues, although the Oracle JRE is preferred.

Oracle Java should be your first choice unless you have some specific issues. In this chapter, we will use both. If you are using a Windows machine, then chances are that there is no Java runtime preinstalled. We will check and fix this.

After you have correctly installed the JRE, you can move on and install the servlet container. GeoServer is a web application, and it is built using frameworks such as Java servlet and JavaServer Pages technologies. The servlet container, or web container, is the component server that interacts with the servlets. It is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet, and ensuring access security.

As for the servlet container, you have a few choices here; a brief list is available at http://en.wikipedia.org/wiki/Web_container.

Apache Tomcat, GlassFish, and JBoss are most popular, and they are all available under open source licenses. You may wonder which one is the best choice to run GeoServer. According to the official documentation at http://docs.geoserver.org/stable/en/user/index.html:

GeoServer has been mostly tested using Tomcat, and so is the recommended application server. GeoServer requires a newer version of Tomcat (7.0.65 or later) that implements Servlet 3 and annotation processing. Other application servers have been known to work, but are not guaranteed.

In a production environment, usually, several web applications share the same container. In this scenario, you will not choose the container; the architects and system administrators made their choices and you have to conform to them.

As a beginner, you have the opportunity of selecting it! And, in this case, Apache Tomcat should be your first choice as it is widely adopted in the GeoServer developer's community. If you run into any issues, the answer is probably waiting for you in the mailing list archive.

主站蜘蛛池模板: 沭阳县| 五原县| 建始县| 南岸区| 北京市| 龙岩市| 马尔康县| 土默特左旗| 桂平市| 大厂| 阜南县| 南宁市| 资中县| 新龙县| 马关县| 叶城县| 杂多县| 探索| 凤阳县| 北安市| 仁化县| 方城县| 文登市| 台州市| 苏州市| 景东| 壤塘县| 邵阳市| 黄骅市| 临泽县| 高密市| 定州市| 习水县| 文水县| 富顺县| 专栏| 渝北区| 齐齐哈尔市| 石阡县| 香河县| 龙口市|