GeoServer Installation: A Step-by-Step Guide
Learn how to install GeoServer on your system with this comprehensive step-by-step guide. GeoServer is an open-source server used for managing and sharing geospatial data.
GeoServer is an open-source server for sharing spatial data. Follow this guide to install and configure it on your system.
Step 1: Install Java
GeoServer requires Java to run. Check if you have it installed:
java -version
If Java is not installed, install OpenJDK 8:
sudo apt-get update
sudo apt-get install openjdk-8-jdk openjdk-8-jre
Step 2: Install PostgreSQL with PostGIS (Optional)
If you plan to use PostgreSQL as a datastore, install it along with PostGIS:
sudo apt install postgresql postgresql-contrib
sudo apt install postgis
Step 3: Download and Extract GeoServer
Download the latest GeoServer binary from the official website:
Alternatively, use the terminal to download and extract it:
wget https://sourceforge.net/projects/geoserver/files/GeoServer/2.18.1/geoserver-2.18.1-bin.zip/download
unzip geoserver-2.18.1-bin.zip
Step 4: Move and Set Up GeoServer
Move the extracted GeoServer folder to /usr/local/ and set the GEOSERVER_HOME environment variable:
sudo cp -r GeoServerExtractedFolder /usr/local/
echo "export GEOSERVER_HOME=/usr/share/GeoServerExtractedFolder" >> ~/.profile
. ~/.profile
#export GEOSERVER_HOME=/usr/local/GeoServerExtractedFolder
sudo chown -R $(whoami) /usr/local/GeoServerExtractedFolder/
Step 5: Start GeoServer
Run the startup script to start the server:
./usr/local/GeoServerExtractedFolder/bin/startup.sh
GeoServer will be available at:
http://localhost:8080/geoserver
Login Credentials:
**Username:** admin
**Password:** geoserver
Step 6: Getting Started with GeoServer
Once logged in, set up your spatial data:
Create a Workspace:
Navigate to Workspaces > Add new workspace
This acts like a project container for your data.
Add a Data Store:
Navigate to Stores > Add new store
Choose a data source such as Shapefiles, PostGIS, GeoTIFF, or Web Map Services (WMS).
Add a Layer:
Navigate to Layers > Add new layer
Select the data store and configure its properties.
You can preview layers in the Publishing tab and apply styles using Styled Layer Descriptor (SLD) files.
Now you have a fully functional GeoServer running! 🚀