Tuesday, 19 October 2021

How To Install GeoServer on CentOS / RHEL 8

How To Install GeoServer on CentOS / RHEL 8

In this article, you will learn how to install GeoServer on CentOS / Rocky / RHEL 8 or similar Linux distros.


Table of Contents:




What is GeoServer? :

GeoServer is an open-source server written in Java that allows users to share, process and edit geospatial data. Designed for interoperability, it publishes data from any major spatial data source using open standards. GeoServer has evolved to become an easy method of connecting existing information to virtual globes such as Google Earth and NASA World Wind as well as to web-based maps such as OpenLayers, Leaflet, Google Maps and Bing Maps.

GeoServer functions as the reference implementation of the Open Geospatial Consortium Web Feature Service standard, and also implements the Web Map Service, Web Coverage Service and Web Processing Service specifications.

GeoServer aims to operate as a node within a free and open Spatial Data Infrastructure. Just as the Apache HTTP Server has offered a free and open web server to publish HTML, GeoServer aims to do the same for geospatial data.

Recommended Book: GeoServer Beginner's Guide - Second Edition: Share geospatial data using Open Source standards 2nd Revised edition by Stefano Iacovella.


GeoServer Features:

GeoServer reads a variety of data formats, including:

  • PostGIS
  • Oracle Spatial
  • ArcSDE
  • DB2
  • MySQL
  • MongoDB
  • Apache Solr
  • Shapefiles
  • GeoTIFF
  • GTOPO30
  • ECW, MrSID
  • JPEG2000

Through standard protocols it produces KML, GML, Shapefile, GeoRSS, PDF, GeoJSON, JPEG, GIF, SVG, PNG and more. In addition, one can edit data via the WFS transactional profile (WFS-T). GeoServer includes an integrated OpenLayers client for previewing data layers.

GeoServer additionally supports efficient publishing of geospatial data to Google Earth through the use of network links, using KML. Advanced features for Google Earth output include templates for customized pop-ups, time and height visualizations, and "super-overlays".

GeoServer relies on GeoTools, a GIS library.


Environment Specification:

We are using a minimal RHEL 8 virtual machine with following specifications.

  • CPU - 3.4 Ghz (2 cores)
  • Memory - 2 GB
  • Storage - 20 GB
  • Operating System - Red Hat Enterprise Linux 8.4
  • Hostname –
  • IP Address -


Update your Linux Server:

Connect with as root user by using a ssh client.

It is the best practice to update Linux server before installing any new software.

Therefore, execute following dnf command to update your Linux server.

# dnf update -y

If the above command updates your Linux Kernel, then restart your operating system with new Kernel before moving forward.

# reboot

After reboot, login to your GeoServer machine and verify the Linux Kernel and operating system versions.

# uname -r

# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.4 (Ootpa)"
PRETTY_NAME="Red Hat Enterprise Linux 8.4 (Ootpa)"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"


Install Java Runtime Environment on CentOS / RHEL 8:

GeoServer software is developed in Java programming language, therefore, you have to install Java runtime environment to execute GeoServer application.

Use dnf command to install OpenJDK on your Linux operating system.

# dnf install java-1.8.0-openjdk-devel

After installation, verify the Java version.

# java -version
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)


Install GeoServer Software on CentOS / RHEL 8:

To download and extract you may need wget and unzip software packages.

Therefore, install these packages before installing GeoServer on your Linux server.

# dnf install -y wget unzip

You can download GeoServer software from their Official website.


Right Click on the "Platform Independent Binary" and "copy link address" if you are using Google Chrome. The option may vary on other web browsers.

Use the wget command to download GeoServer software directly from the Linux CLI.

# cd /tmp
# wget
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 103982460 (99M), 28517756 (27M) remaining [application/octet-stream]
Saving to: ‘’

geoserver-2.19.2-bi 100%[++++++++++++++=====>]  99.17M  97.7KB/s    in 3m 26s

2021-10-17 10:20:39 (135 KB/s) - ‘’ saved [103982460/103982460]

Create a directory for GeoServer software and use unzip command to extract downloaded zip file therein.

# mkdir /usr/share/geoserver
# unzip -d /usr/share/geoserver/

Create a Linux user and grant him the ownership of GeoServer home directory.

# useradd -m -U -d /usr/share/geoserver -s /bin/false geoserver
# chown -R geoserver:geoserver /usr/share/geoserver

Allow GeoServer service port in Linux Firewall.

# firewall-cmd --permanent --add-port=8080/tcp
# firewall-cmd --reload

Create a Systemd unit for GeoServer service. You can use vim text editor for this purpose.

# vi /usr/lib/systemd/system/geoserver.service

Add following directives in this file.

Description=GeoServer Service






Enable and Start geoserver.service.

# systemctl daemon-reload
# systemctl enable --now geoserver.service

To access GeoServer application, open URL in a web browser.


Login with default credentials i.e. admin/geoserver




In this article, you have learned how to install GeoServer on CentOS / Rocky / RHEL 8 or similar Linux distros.

If you find this article useful? Don't you mind support us by Buy Me A Coffee

No comments:

Post a Comment

© 2022 CentLinux. All Rights Reserved.