How to Install OpenMAINT on Ubuntu 20.04

OpenMAINT is open-source software for property and facility management. The application is suited for the management of real estate assets, industrial facilities, infrastructures, and related maintenance activities. It can be used to manage mobile assets, technical devices, furniture, etc., and the related logistical, economical, and maintenance activities, scheduled or unplanned ones.

OpenMAINT can be extremely helpful to various types of organizations, like banks, public departments, construction, and manufacturing companies, etc. in organizing, maintaining, and distributing their inventory and supplies, scheduling repairs, and reporting problems. It can be customized according to the needs of the organizations.

OpenMAINT is a web-based software, there is no executable file, so it must run on a web server and be accessed through a web browser. It is a vertical application based on the framework CMDBuild from which it inherits the architecture and components.

This tutorial shows how to install openMAINT Version 2.1 (with CMDBuild core 3.3.1) on Ubuntu 20.04.

Prerequisites

We must meet the following software requirements in order to install openMAINT:

  • PostgreSQL from 9.5 to 10.x;
  • PostGIS 2.4 or 2.5 (optional);
  • Apache Tomcat 9.0 (9.0.30 recommended);
  • JDK 1.11;
  • any DMS that supports the CMIS protocol (Alfresco Community recommended - optional);
  • Geoserver 2.10.1 (optional);
  • BIMServer 1.5.138 (optional).

First of all, we have to update the Ubuntu system:

$ sudo apt-get update
$ sudo apt-get upgrade

Installing the Java Development Kit

We will now install openjdk-11 using this command:

$ sudo apt-get install default-jdk

Installing PostgreSQL

Now, we need to install and set up the PostgreSQL database for the openMAINT. We'll first install PostgreSQL and its additional packages. We must install PostgreSQL version 10 because at the time of writing there was an openMAINT bug when using it with PostgreSQL version 11 and newer.

To install the older release of PostgreSQL, we must add their repository to APT by typing the following commands:

$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

$ RELEASE=$(lsb_release -cs) 
$ echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee  /etc/apt/sources.list.d/pgdg.list

After importing GPG key, and adding repository contents, verify it, and update the system:

$ cat /etc/apt/sources.list.d/pgdg.list
deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main

$ sudo apt-get update

Now install PostgreSQL:

$ sudo apt-get install postgresql-10 postgresql-contrib

This will create a new user named "postgres" on your Ubuntu server.  Set your password for this account using the passwd command and write it down because you'll need it later in the setup and also to log in to your postgres user account. I'll set the password to admin.

$ sudo passwd postgres
 New password: 
 Retype new password: 
 passwd: password updated successfully

Installing PostGis

Next we need to install PostGis packages - Geographic objects support for PostgreSQL

$ sudo apt-get install postgis postgresql-10-postgis-3 libpostgis-java

Setting up PostgreSQL Database Server

Now we can switch to user postgres to create a database for openMAINT:

$ sudo su - postgres

When asked for a password, use the one you set above. Mine was admin. Now go ahead and set a password for the postgres database user. Replace "admin" with the password you'll use for the database. I'll be using password admin once again:

$ psql -d template1 -c "ALTER USER postgres WITH PASSWORD 'admin';"

Type exit to return to default user.

Downloading and Installing OpenMAINT

At the time of writing this tutorial, the latest version of openMAINT is 2.1.

We will now download the latest version using wget command:

$ wget https://downloads.sourceforge.net/project/openmaint/2.1/Core%20updates/openmaint-2.1-3.3.1/openmaint-2.1-3.3.1.war

Once you have downloaded the package, start the openMAINT installation:

$  java -jar ./openmaint-2.1-3.3.1.war install

Now, follow and type the installation options:

CMDBuild interactive install wizard - welcome!
 this wizard will guide you in the process of installing and configuring a new instance of CMDBuild!
 tomcat install location [/home/vagrant/cmdbuild_30] : 

Installer will install the portable Tomcat server and we will use the default path it shows.

Also we will use the default ports (just press enter):

tomcat http port [8080]:
tomcat shutdown port (offset already applied) [8005]:
tomcat debug port (offset already applied) [8000]:

Now we must enter the PostgreSQL server info. We use the localhost and default port (just press enter):

postrgres db [localhost:5432]:

For the admin account we use the PostgreSQL username and the password we have set earlier:

postrgres admin account [postgres/postgres]: postgres/admin

For the database name we also use the default database:

cmdbuild posrgres database name [cmdbuild_99d5] :

Next, we will dump data into the PostgreSQL database. There are two data sets available, but in this example, we will use the demo data.

* emtpy.dump.xz: a database dump with a basic structure and some minimal information like a default admin account;

* demo.dump.xz: a database dump with a basic structure and some more information added in the system, like example users;

We will dump the demo data set to our database (just press enter):

database dump to load [demo]:

Check the installation details and continue when ready:

we're ready to begin, this is your configuration: 

tomcat: /home/vagrant/cmdbuild_30  
http port: 8080  
shutdown port: 8005  
debug port: 8000  
postgres database: localhost:5432/cmdbuild_99d5  
database dump: demo.dump.xz

if everything is ok, press ENTER to begin installation

Running Tomcat Server and openMAINT

After the installation has finished, enter the tomcat bin directory by typing:

$ cd cmdbuild_30/bin/

Then type:

$ ./startup.sh 

And you should get the following terminal output stating that the Tomcat server has started:

 Using CATALINA_BASE:   /home/vagrant/cmdbuild_30
 Using CATALINA_HOME:   /home/vagrant/cmdbuild_30
 Using CATALINA_TMPDIR: /home/vagrant/cmdbuild_30/temp
 Using JRE_HOME:        /usr
 Using CLASSPATH:       /home/vagrant/cmdbuild_30/bin/bootstrap.jar:/home/vagrant/cmdbuild_30/bin/tomcat-juli.jar
 Using CATALINA_PID:    /home/vagrant/cmdbuild_30/bin/catalina.pid
 Tomcat started.

When you want to stop the Tomcat server and openMAINT you should use the shutdown.sh script from the same directory.

Logging-in to openMAINT Dashboard

Now navigate to http://your-server-ip:8080/cmdbuild/ and you will be greeted with a login form:

OpenMAINT login form
OpenMAINT login form

You can use the following credentials to log-in to your OpenMAINT Dashboard:

Username: admin Pass: admin
Username:
demouser Pass: demouser

After giving the right credentials, you will see its management console where you can now manage your assets and inventory:

Management Summary
Management Summary
Maintenance Summary
Maintenance Summary
Maintenance Statistics Report
Maintenance Statistics Report
maintenance_inspection_form
Maintenance Inspection Form
Maintenance Calendar
Maintenance Calendar

Conclusion

OpenMAINT is a useful application for organizations used for managing their mobile assets like machinery, engineering, furniture, etc. In the real estate industry, it can be used to maintain the data about buildings, infrastructure, maintenance, etc. It can also be useful for other maintenance activities related to planning. It is the all-in-one solution, configured with workflows, reports, and dashboards that can be activated and used according to the needs of each organization and their available resources.

4 Comments... add one

  1. I am trying to install OpenMAINT on Ubuntu 20.04. But i am getting the following error when access the OpenMAINT web interface at http://45.58.38.113:8080/cmdbuild:

    HTTP Status 404 – Not Found
    Type Status Report

    Message /cmdbuild

    Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

    Apache Tomcat/9.0.31

    Reply
  2. This is great. I hv successfully install using the guide above. the question is, I installed with demo data and now I need to use my own database like creating a new one, how do I do that?

    Reply

Leave a Comment