In this blog post, we will walk you through the steps to install OpenMAINT and GeoServer on Ubuntu server. The installation process includes setting up Java 17, PostgreSQL 12, GeoServer, and finally, OpenMAINT.
Pre-requisites
Before we start, we need to ensure that the system is updated and all the necessary dependencies are installed.
Step 1: Update Your System
Start by updating the apt repository to ensure you have the latest packages.
sudo apt-get update -y
sudo apt-get upgrade
Once the system is updated, install the unzip utility:
sudo apt install unzip
Step 2: Install Java
openMAINT requires Java for proper functionality. Let’s install it and verify the installation
sudo apt-get install openjdk-17-jdk
java -version
Step 3: Install PostgreSQL 12
openMAINT requires PostgreSQL 12 to store its data. However, PostgreSQL 12 is not available by default on Ubuntu 20.04, so we need to add the PostgreSQL repository.
Import the PostgreSQL Repository Key
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
Add the PostgreSQL Repository
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql-pgdg.list > /dev/null
sudo apt-get update
Install PostgreSQL 12
sudo apt-get install postgresql-12
Install PostGIS for GeoSpatial Data
sudo apt install postgresql-12-postgis-3 libpostgis-java
Step 4: Configure PostgreSQL
We need to configure PostgreSQL by changing the superuser password. Set a password for the postgres user:
sudo passwd postgres
Add the postgres user to the sudo group:
sudo usermod -aG sudo postgres
Log into PostgreSQL:
sudo -u postgres psql template1
Change the postgres user password:
ALTER USER postgres WITH PASSWORD 'PSSWD';
Replace 'PSSWD' with your preferred password.
Exit the PostgreSQL console:
\q
Step 5: Install GeoServer
GeoServer is required to provide map and spatial data services for openMAINT.
Create a geoserver user and add it to the sudo group:
sudo adduser geoserver
sudo usermod -aG sudo geoserver
sudo su - geoserver
Download GeoServer:
wget https://sourceforge.net/projects/geoserver/files/GeoServer/2.21.0/geoserver-2.21.0-bin.zip
Extract the GeoServer zip file:
unzip -d /home/geoserver/server geoserver-2.21.0-bin.zip
Edit the GeoServer port configuration:
nano /home/geoserver/server/start.ini
In the start.ini file, change the line and Save the file:
jetty.http.port=8082
Add GeoServer as a service:
sudo nano /usr/lib/systemd/system/geoserver.service
Add the following configuration:
[Unit]
Description=GeoServer Service
After=network.target
[Service]
Type=simple
User=root
Environment="GEOSERVER_HOME=/home/geoserver/server"
ExecStart=/home/geoserver/server/bin/startup.sh
ExecStop=/home/geoserver/server/bin/shutdown.sh
[Install]
WantedBy=multi-user.target
Reload systemd and enable GeoServer to start on boot:
sudo systemctl daemon-reload
sudo systemctl enable --now geoserver
Now GeoServer should be running, and you can access it via http://YOUR-IP:8082/geoserver using the default credentials: admin / geoserver.
Step 6: Install OpenMAINT 2.3
Finally, let’s install OpenMAINT.
Create an openmaint user:
sudo adduser openmaint
sudo usermod -aG sudo openmaint
sudo su - openmaint
Download openMAINT 2.3:
wget https://downloads.sourceforge.net/project/openmaint/2.3/openmaint-2.3-3.4.1-d.war
Run the installation:
java -jar ./openmaint-2.3-3.4.1-d.war install
During the installation process, you will be prompted for several configurations:
- PostgreSQL admin account: postgres/PSSWD (use the password you set earlier).
- CMDBuild PostgreSQL database name: openmaint_db
- Database dump to load: empty
Follow the instructions on the screen and complete the installation.
Step 7: Launch OpenMAINT
Begin by navigating to the cmdbuild_30 directory and executing the following command:
cd cmdbuild_30/bin/
./startup.sh
Step 8: Access the OpenMAINT Dashboard
With OpenMAINT now running and accessible on port 8080, you can visit it by navigating to the following URL: http://your-server-ip:8080/cmdbuild.
This will take you to the OpenMAINT login page, where you can log in using the default credentials:
Username: admin
Password: admin
After logging in, you will be redirected to the OpenMAINT dashboard.
If you need assistance with the process, our team is here to help you install OpenMAINT and GeoServer on Ubuntu server seamlessly. Contact us today for expert support and guidance to ensure a smooth installation!