How to Install OpenMaint on Ubuntu 16.04

OpenMAINT is an open source platform for facility and property management of all scales and industries. It is which can be used for the management of infrastructure, assets, buildings, and other professional equipment. It also helps in streamlining the maintenance processes and allows to make decisions while allocating resources for the new projects.

OpenMaint is designed and configured with its powerful tools like its dashboards, inventory control, reports, and tracking and history records. Typically businesses operating in construction, manufacturing or transport services can integrate this seamless software into their systems and gear the day to day operations through it. It is customizable according to the needs of the organizations.

It helps in the management of orders to the right team or supplier and offers planning, execution, and registration of intervention reports, preventive maintenance, mobile access, planning calendar, and others. It also includes financial management, logistics management, service history tracking, GIS and BIM support. The software was designed and launched by Tecnoteca SRL headquartered in Italy. In this article, we show how to install openmaint on Ubuntu 16.04.


We need the following software packages to be installed on our system for the successful setup of OpenMaint. The minimum and suggested requirements for openMAINT software setup are mentioned below.

1) Install Tomcat 7

First of all, we are going to install Apache tomcat version 7, alongside its additional packages on our Ubuntu server by using below command:

# apt-get install tomcat7 tomcat7-docs tomcat7-admin tomcat7-examples

Press "y" key and "Enter" to confirm the installation of Tomcat7 along with its dependencies and additional packages. Once installed, you can test if its working fine by opening the link below in your browser, with the default port "8080". If you're using it on a local server, use "localhost".


If it's all good, you will see a message like 'It works'.

Now, we let's set up the roles for tomcat manager webapp to enable us access the control panel in the future.

# gedit /etc/tomcat7/tomcat-users.xml

Clear the contents of the file and paste the following text in there:

<?xml version="1.0" encoding="UTF-8"?>
 <role rolename="manager-gui"/>
 <role rolename="manager-script"/>
 <role rolename="manager-jmx"/>
 <role rolename="manager-status"/>
 <role rolename="admin-gui"/>
 <role rolename="admin-script"/>
 <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>

Take note of the username and password entry. You'll need it when accessing the manager webapp at http://server_IP:8080/manager/html and http://server_IP:8080/host-manager/html/.

2)Install the Java Development Kit

To install JDK on Ubuntu 16.04, we will run the following command which installs the recommended version of OpenJDK 8.

# apt-get install default-jdk

Press 'y' to continue installing JDK on Ubuntu, this enables us to develop Java applications to run on our Tomcat server. Next, we will be installing Apache Ant, which is used to build Java applications, and a source control system, git, using the command below.

# apt-get install ant git

3) Install PostgreSQL

Now, we need to install and setup PostgreSQL, as the most of openMAINT depends on it. We'll first install postgresql and it's additional packages by typing the following command:

# apt-get install postgresql postgresql postgresql-contrib

This will create a new user on your PC with the name "postgres".  Set your password for this account using the command below and take note of it as you'll need it later in the setup and also to log in to your postgres user account.

# passwd postgres

After that, we will install a web administrator tool to manage PostgreSQL database, and this can be installed using command:

# apt-get install pgadmin3

Use the command below to find more modules i.e PostGIS, procedural languages, client interfaces, etc to install.

apt-cache search postgres

4) PostgreSQLDatabase server setup

Now we have successfully installed PostgreSQL database server, let's connect to the user "postgres" and create a database which we'll use to setup openMAINT soon.

# su - postgres

When you're asked for a password, use the one you set in step 3 above. Now go ahead and set a password for the postgres database user. Replace "newpassword" with the password you'll use for the database.

# psql -d template1 -c "ALTER USER postgres WITH PASSWORD 'newpassword';"

Now let's create a database for openMAINT. In our case, we'll use postgresqldb as our database name.

# createdb postgresqldb

To connect  to your database, enter:

psql postgresdb

Type \q to disconnect from the database and type exit to logout from postgres back to your normal user account.

5) Install JODBC

Java is platform neutral, it is a simple process of just downloading the appropriate JAR file and dropping it into your classpath. Let's download the required version, which can download by using link to PostgreSQL JDBC Driver.

We will use below command to get the required JDBC driver.

# wget…/postgresql-9.4-1200.jdbc4.jar

Next, using below command copy this to the tomcat's 'lib' directory.

# cp postgresql-9.4-1200.jdbc4.jar /usr/share/tomcat7/lib

6) Download and Install OpenMaint

The latest version of OpenMaint can be downloaded from their official web page.

# wget

Once you have downloaded the package, then extract it, enter the directory, and copy the libraries in 'extras/tomcat-libs' using below commands.

# unzip
# cd openmaint-1.1-2.4.2
# cp ./extras/tomcat-libs/6.0\ or\ higher/postgresql-9.4.1207.jar /usr/share/tomcat7/lib/

Then copy openmaint-{version}.war to 'openmaint.war' using below commands.

# cp openmaint-1.1-2.4.2.war /var/lib/tomcat7/webapps/openmaint.war

Then we will copy cmdbuild-shark-server-{version}.war to 'shark.war' using below command.

# cp openmaint-shark-server-1.1-2.4.2.war /var/lib/tomcat7/webapps/shark.war

The .war files will extract, after which you can delete them by entering the following command:

# rm -r /var/lib/tomcat7/webapps/shark.war /var/lib/tomcat7/webapps/openmaint.war

Now restore the database in the openMAINT database folder to the database your earlier created. To do this:

  • Open the dash and type "pgadmin3" and press Enter.
  • Click the Connect button and connect to your PostgreSQL server by filling the required parameters.
  • Under the postgres user account, expand the databases, right-click on the database you created and select Restore.
  • Now, choose any of the database files in the openmaint folder, select postgres under rolename, and click Restore. The process status will exit with 0 if the database has been restored.

7) OpenMaint Web Installation Wizard

All the files are in place, now we will go through its web installation wizard, which can be carried out by opening the following URL followed by the IP address of our server and port 8080 as shown below. In our case, we'll use localhost.

Edit the context.xml file in the Shark and change the database name from ${cmdbuild} to the name you gave to your database. You can use your favorite text editor or type:

# gedit /var/lib/tomcat7/webapps/shark/META-INF/context.xml

Now edit the Shark.conf file and set the parameter "" with the url of your openmaint application e.g. http://localhost:8080/openmaint.

# gedit /var/lib/tomcat7/webapps/shark/conf/Shark.conf

Now, restart the Tomcat application server:

# service tomcat7 restart

Now let's begin with the actual openmaint installation. In your browser, visit the following website:

choose language

Let's configure the basic web configurations after opening the mentioned URL in your web browser as shown below.

Next, we need to configure database settings and then test the connection, if it works good, then click on the 'Finish' button at the bottom right corner and you'll be directed to the login page.

8) Access to OpenMAINT Dashboard

After successful Database connection testing, refresh your web page and you will the login page as shown below. You can use below credentials to log in to your OpenMaint Dashboard.

Username: admin Pass: admin
demouser Pass: demo

openmaint login

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


Click Administration Module and go to Setup -> Workflow Engine and check the "Enabled" box and fill the "Server URL" field with the URL of shark (e.g. http://localhost:8080/shark). Click on Save to commit the changes.


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

24 Comments... add one

  1. What would be very useful would be to work on a Dockerised approach - this would simmplify your manual approach quite a lot.

  2. Hi,

    The article is very useful. I have follow through the steps.

    I hit a page 404 error on the Step 7) OpenMaint Web Installation Wizard when i try to access via http://server_ip:8080/openmaint

    HTTP Status 404 - /openmaint
    type Status report
    message /openmaint
    description The requested resource is not available.
    Apache Tomcat/8.0.32 (Ubuntu)

    May i know how i can i fix up the error?

        • I did notice if I go into tomcat admin console and add only the openmaint.war I am able to start the openmaint web site (still cant do anything), once I add the shark.war, that site will not start in the console...iif that helps. This was a fresh install (tried with ubuntu 16.04 server and desktop) following step by step. Any help would be greatly appreciated. Something has to be missing

  3. Hey guys the directory where the war files are being copied is wrong!! The correct directory is shown in the "ItWorks" page if you got the tomcat server running correctly. This is reported to be at /var/lib/tomcat8/webapps. This way it works.

    But I could not get the postgresql part because the explanation has the image of a MySQL/MariaDB page, not postgresql. Can anyone help on this?

    • If you follow the instructions, it will create the database. the Mysql image is if you choose mysql over postgresql. you wont run them both.

  4. I could not pick up if the Alfresco DMS was installed in this procedure? I would try to download the war file and copy it in the autodeploy directory to see if it works, but I can tell it needs some configuration too. Any help on this would be greatly appreciated.

  5. cp openmaint-1.1-2.4.2/openmaint-1.1-2.4.2.war /usr/share/tomcat8/webapps/openmaint.war
    cp: cannot create regular file '/usr/share/tomcat8/webapps/openmaint.war': No such file or directory

    There is no webapps directory under /usr/share/tomcat8/ Should I create one?
    ls -al /usr/share/tomcat8/
    total 32
    drwxr-xr-x 4 root root 4096 Jul 11 11:26 .
    drwxr-xr-x 138 root root 4096 Jul 11 11:31 ..
    drwxr-xr-x 2 root root 4096 Jul 11 11:26 bin
    -rw-r--r-- 1 root root 39 Mar 31 07:35 defaults.md5sum
    -rw-r--r-- 1 root root 1929 Apr 10 14:59 defaults.template
    drwxr-xr-x 2 root root 4096 Jul 11 11:43 lib
    -rw-r--r-- 1 root root 53 Mar 31 07:35 logrotate.md5sum
    -rw-r--r-- 1 root root 118 Apr 10 14:37 logrotate.template

  6. I am able to install openmaint according to your documentation but for some reason the Dashboard is not there neither is the Space and Inventory under the Navigation. Maybe you can help me how to access these portions of Openmaint.

  7. Hi,
    Folowed all the steps to trying to get "pgadmin3 to run (to load the database.
    I am running a Win 10 PC with an Ubantu VPS. So since it is Win 10 and not Linux on my pc I cannot use the Dash.
    I couldn't use Gedit but had to use nano for editing because I am stuck with:
    " Error: Unable to initialize GTK+, is DISPLAY set properly?" in PuTTY all the time.
    I have tried to lookup solutions re export DISPLAY=:0 with lots of variations on that theme (hours of searching and testing) but no results. So cannot get the pgadmin3 interface up to manage the Database.
    I gave this my best shot but cannot get any further. I think there is a presumption of a specific level of Ubantu skill that is not noted at the introduction.
    Shame. I really wanted to get this working. Yet another bum lead for installing openMaint.
    All the best for the rest of you,

    • In reality , if you are setting up an openmaint server, the use of the graphic interface is irrelevant. All of the commands to manage the installation can be done via terminal. You just have to look a little deeper into postgresql, but it is doable.

  8. I'm trying to restore but got error
    "00:44:44: Error: File '' couldn't be removed (error 2: No such file or directory)"
    please help..

    • Make sure you check this:
      $ sudo nano /etc/default/tomcat7

      uncomment JAVA_HOME and change to JAVA_HOME=/usr/lib/jvm/java-8-oracle – this will ensure Tomcat7 uses the newly installed Java8

      uncomment the “TOMCAT7_SECURITY=no”

      uncomment the “LOGFILE_DAYS=14” line to keep logfiles to: /var/log/tomcat7

  9. Hi,
    Thank you for detailed guidance, I love it. However, during database restore, pgadmin3 shows several errors, (ranging from 89 to 8870 errors!), most important ones are concerning "shark" user missing and some none-existing files. I think that's why when I try to log-in the management.jsp, it stops functioning at splash screen. only at some random time, it switched to administration.jsp but the management page never showed again.

  10. What should I do , after login , why it took so slowly to display management page area almost 5 minutes.
    My VPS specification are 8 vCPU ,RAM 8GB .

  11. # apt-get install postgresql postgresql postgresql-contrib

    There is two postgresql entries, I'm fairly certain one is supposed to be postgis as referred to in cmdbuild's document for installing openMAINT. They also suggest Tomcat8.


  12. # createdb postgresqldb
    To connect to your database, enter:

    psql postgresdb

    This is an error. You just created a database called postgresqldb not postgresdb. You will need to change one or the other to be consistant.

  13. Hi.
    I do all the things for openmaint-2.1-3.3-b version with these commands little bit changing some places..But finally when i going to database configure in openmaint ui, thouh test database connection is success, when pressing configure button it gives following error. Could anyone say how i fix it?

    java.lang.RuntimeException: error saving config to file for namespace = org.cmdbuild.database, caused by: java.lang.RuntimeException: /var/lib/tomcat9/conf/openmaint/database.conf (Permission denied), caused by: /var/lib/tomcat9/conf/openmaint/database.conf (Permission denied)


Leave a Comment