Kamal Hosen
Kamal Hosen
Geospatial Developer | Data Science | Python

Nov 06, 2022

How to Install GeoServer at Linux Ubuntu Server Using Linux Binary?

/media/article-img/geoserver-binary.png

GeoServer is an open-source java-based GIS server. GeoServer publishes geospatial data in an open standards format set forth by the Open Geospatial Consortium (OGC).

There are many ways to install GeoServer in Ubuntu Linux. GeoServer provides Linux binary and a stand-alone web archive packaged for use with existing application servers such as Apache Tomcat and Jetty.

GeoServer provides a platform-independent binary that works inside jetty, a lightweight and portable application server. It has the advantage of working very similar across all operating systems and is very simple to set up.

 

Step – 1: Install Java

 

GeoServer is written in Java. It requires a Java 8 or Java 11 environment (JRE) to be installed on your system. For this purpose, We will install Java Development Kit (OpenJDK).

sudo apt install default-jdk 

After successfully installed, check the java version by typing the below command -

java --version

The output should look similar to this -

openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

 

Step – 2: Download GeoServer Platform Independent Binary

 

Visit https://geoserver.org/ and then navigate to the download page https://geoserver.org/download/. GeoServer has two versions one is Stable, and another is Maintenance. The stable version is the latest one. The maintenance one is the earlier release version which is now maintained and officially supported for a specific time. Here, we will choose the stable version for this installation. Click on it, and it will be redirected to the https://geoserver.org/release/stable/ page. Here, you will see GeoServer packages. There have three packages – Platform Independent Binary, Windows Installer for windows machine uses only, and web archive that requires additional java based servers like Apache Tomcat. Click on the Platform Independent Binary. A ZIP file will be downloaded in the downloaded directory.

Step – 3: Extract the ZIP archive

 

Download the zip archive and unpack it to the directory where you would like the program to be located.

It is suggested to place the extracted GeoServer inside /usr/share/. So, the GeoServer path will be /usr/share/geoserver

After extracting the ZIP archive, add an environment variable to save the location of GeoServer by typing the following command:

echo "export GEOSERVER_HOME=/usr/share/geoserver" >> ~/.profile
. ~/.profile

Now, define the ownership of the GeoServer folder by typing the following command in the terminal window and replacing USER_NAME with your own username .

sudo chown -R USER_NAME /usr/share/geoserver/

 

Step - 4: Start GeoServer

 

Now, navigate to the geoserver/bin directory by using cd command and execute the startup.sh script.

cd geoserver/bin
sh startup.sh

In a web browser, navigate to http://localhost:8080/geoserver.

If everything is okay, GeoServer will be run and started successfully. You will see a Welcome page.

Share To

About Author
  • Kamal Hosen
  • Kamal Hosen
    Geospatial Developer | Data Science | Python

    A passionate geospatial developer and analyst whose core interest is developing geospatial products/services to support the decision-making process in climate change and disaster risk reduction, spatial planning process, natural resources management, and land management sectors. I love learning and working with open source technologies like Python, Django, LeafletJS, PostGIS, GeoServer, and Google Earth Engine.