CMDBuild Forum

Installing OpenMaint from scratch

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

You can upload an attachment to the forum post.
Thank you.
CMDBuild Team

It would be amazing if you could upload your notes. I've been trying to install Openmaint for my work for way too long and am getting frustrated! 
 
 
Previously Ken Malm wrote:

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

 

These are the notes I made to get OpenMAINT fully installed and working with all addons (GIS, Alfresco etc)
 
pictures are missing, not sure how to add a document, this is using Debian (Linux)

Installing openMAINT

 

Install Java

Once connected to server open a new terminal and type sudo apt-get update this will ensure Linux repositories are fully updated ready for install. Java 8, this is not in the repository so we need to add it and then update again to be able to install. Type the following command into the terminal

$ sudo nano /etc/apt/sources.list.d/java-8-debian.list

This will create a new document type the following two lines and save

deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

save the document and exit back to root

We now need to import the GPG key on your system for validate packages before installing can be done. Type the following commands

$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886

$ sudo apt-get install oracle-java8-installer

$ sudo apt-get install oracle-java8-set-default

Install Tomcat 7

We have to install Tomcat 7 over 8 as has greater stability, type the following into the terminal

$ sudo apt-get install tomcat7 tomcat7-admin

This will install Tomcat web server and the administration program


 

Configure Tomcat 7

Run performance tweaks on Tomcat installation above to improve performance

https://blog.layer4.fr/2013/09/03/installing-tomcat-7-on-debianubuntu/

Stop the tomcat7 service as we will be editing configuration files

$ sudo /etc/init.d/tomcat7 stop

Change tomcat 7 user and security settings now service has stopped

$ sudo nano /etc/tomcat7/tomcat-users.xml
 
add in-between <tomcat-users> … </tomcat-users>
 
<role rolename=”manager”/>
<role rolename=”manager-gui”/>
 
Create username and password for tomcat 
 
<user username=”admin” password=”admin” roles=”manager-gui, manager”/>
 
CTRL-O to save
CTRL-X to exit
 
$ 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 “TOMCAT6_SECURITY=no”

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


 

Install PostgreSQL and PostGIS

PostgreSQL 9.4 is the database openMAINT will use and PostGIS is for geo-reference. We need to add the repository to Linux before install 

$ sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main"

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

Once the above commands have been ran we can update Linux

$ sudo apt-get update

And finally install

$ sudo apt-get install postgresql-9.4 pgadmin3

Configure PostgreSQL

We have to change the super user password; follow commands below
Log in using $ sudo -u postgres psql template1
Once logged in run the below code
 
$ ALTER USER postgres WITH PASSWORD 'INSERT_PW_HERE'; 
 
The password entered must be remembered and kept secure
 
Exit out of PostgreSQL using $ \q
 
Open pgAdmin from menu
 
Create a new server and add details as shown below
 
null
Enter password created in last step and click OK
 
Create a new database by right clicking on Databases and choosing New Database enter the following details
null
Click OK
The database has now been install and needs to be configured before use to ensure Geo-referencing works.
Ensure the database is clicked and highlighted and from the main menu in pgAdmin click Plugins -> PSQL Console. A new terminal window will open add the following lines of code. Changing PostGIS directory and database name.
# CREATE schema gis;
# SET SEARCH_PATH TO gis, public, shark;
# \i ${POSTGIS_DIR}/postgis.sql
# \i ${POSTGIS_DIR}/spatial_ref_sys.sql 
# ALTER DATABASE ${DB_NAME} SET search_path="$user", shark, public, gis;
/q to exit
 
The system is now setup and configured for the installation of OpenMaint
 
 

 

Install openMAINT WAR

Download

http://www.openmaint.org/en/download/download
Click download from sourceforge
Once downloaded extract in downloads folder

Database restore

In pgAdmin right click on the newly created database and choose restore, and choose from the following database in openMAINT folder 
Demo, Empty, GIS or use a database you have saved before

Libraries

Copy libraries across to tomcat7 to do this we must rename “6.0 higher” to “6” in folder found below
 /home/osboxes/downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/
Simply type the following to copy a required file from openmaint folder to Tomcat7
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/6/postgresql-9.4.1207.jar /usr/share/tomcat7/lib

Download JDBC  (9.4.1212.jar) from ww.jdbc.postgresql.org/download.html

And as above copy to the tomcat7 lib folder

 

Sudo cp /home/osboxes/Downloads/postgresql-9.4.1212.jar /usr/share/tomcat7/lib
 

 


 

WAR files

Rename the two war files in openMAINT folder to openmaint and shark
Ensure the tomcat server is stopped
Move both war files to tomcat webapps folder
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/openmaint.war /var/lib/tomcat7/webapps/
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/shark.war /var/lib/tomcat7/webapps/
Start tomcat7 
This will automatically deploy the war files after a few minutes they should both be fully deployed. 
Log in to localhost:8080/manager to ensure both shark and openmaint are running, if all okay
log in to localhost:8080/openmaint
All being well the system should now be up and running and a few setup pages will now need to be completed
 
 
 
 
 
 

 

Setup openMAINT

The 1st one you simply choose a language and click next
null
Next step is the database screen this will connect to the newly installed and created user in postgresql
null
Choose database existing
Enter name as openmaint (If this is what you used above)
Database connection properties are as follows
Host: Localhost
Port: 5432
Super User: postgres
Password: Admin ß depends what was given in setup
Click test connection, if successful click finish and then click ok, you will now be ready to log in, using either admin admin or demouser
null
The system is now configured and simply needs a user name and password to be chosen for the super user (site admin)

 

 


 

Shark configuration

Stop the Tomcat7 service

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/META-INF/context.xml) per the manual. I change the URL to represent my database name. I don't change any other value. Screenshot: http://i.imgur.com/2Rw7g3D.png

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/conf/Shark.conf) per the manual. I change the org.cmdbuild.ws.url setting to equal my CMDBuild site address. I leave the usename and password as they were. I don't change anything else. Screenshot: http://i.imgur.com/cjkWEou.png

Edit (/var/lib/tomcat7/webapps/cmdbuild/WEB-INF/conf/auth.conf). I remove the comment from the line: serviceusers.prigileged=workflow. Screenshot: http://i.imgur.com/SAgIV0H.png

Start the Tomcat Server using sudo /etc/init.d/tomcat7 start.

Log in and enable the Workflow server and change URL to the Shark deployment. Do not change the username or password.

Create a new user named "workflow" if not already created with the password "changeme". This matches the default values for username and password in the Shark.conf file 

Change the owner of the Shark schema in the DB to the shark user. In case previously owned by the postgres user. Make sure Workflow user is only tied to one user group in the users model of OpenMAINT

Alfresco Document Management

If you require document management use the following online guides
Next step is install and connecting Alfresco used for document management

Use WordPress guides

http://dl.alfresco.com/release/community/build-3370/alfresco-community-3.4.d-installer-linux-x64.bin

https://kickingtech.wordpress.com/2014/05/26/alfresco-community-edition-4-2-step-by-step-manual-installation/
 
 
 
Previously Tas wrote:
It would be amazing if you could upload your notes. I've been trying to install Openmaint for my work for way too long and am getting frustrated! 
 
 
Previously Ken Malm wrote:

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

 

 

Hi Ken,

I've been struggling for 3 days on trying to install this software. An ovf would be fantastic. How would I be able to get a hold of image?

 

Thanks,

Philip

 

 

 

Previously Marc wrote:
These are the notes I made to get OpenMAINT fully installed and working with all addons (GIS, Alfresco etc)
 
pictures are missing, not sure how to add a document, this is using Debian (Linux)

Installing openMAINT

 

Install Java

Once connected to server open a new terminal and type sudo apt-get update this will ensure Linux repositories are fully updated ready for install. Java 8, this is not in the repository so we need to add it and then update again to be able to install. Type the following command into the terminal

$ sudo nano /etc/apt/sources.list.d/java-8-debian.list

This will create a new document type the following two lines and save

deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

save the document and exit back to root

We now need to import the GPG key on your system for validate packages before installing can be done. Type the following commands

$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886

$ sudo apt-get install oracle-java8-installer

$ sudo apt-get install oracle-java8-set-default

Install Tomcat 7

We have to install Tomcat 7 over 8 as has greater stability, type the following into the terminal

$ sudo apt-get install tomcat7 tomcat7-admin

This will install Tomcat web server and the administration program


 

Configure Tomcat 7

Run performance tweaks on Tomcat installation above to improve performance

https://blog.layer4.fr/2013/09/03/installing-tomcat-7-on-debianubuntu/

Stop the tomcat7 service as we will be editing configuration files

$ sudo /etc/init.d/tomcat7 stop

Change tomcat 7 user and security settings now service has stopped

$ sudo nano /etc/tomcat7/tomcat-users.xml
 
add in-between <tomcat-users> … </tomcat-users>
 
<role rolename=”manager”/>
<role rolename=”manager-gui”/>
 
Create username and password for tomcat 
 
<user username=”admin” password=”admin” roles=”manager-gui, manager”/>
 
CTRL-O to save
CTRL-X to exit
 
$ 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 “TOMCAT6_SECURITY=no”

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


 

Install PostgreSQL and PostGIS

PostgreSQL 9.4 is the database openMAINT will use and PostGIS is for geo-reference. We need to add the repository to Linux before install 

$ sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main"

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

Once the above commands have been ran we can update Linux

$ sudo apt-get update

And finally install

$ sudo apt-get install postgresql-9.4 pgadmin3

Configure PostgreSQL

We have to change the super user password; follow commands below
Log in using $ sudo -u postgres psql template1
Once logged in run the below code
 
$ ALTER USER postgres WITH PASSWORD 'INSERT_PW_HERE'; 
 
The password entered must be remembered and kept secure
 
Exit out of PostgreSQL using $ \q
 
Open pgAdmin from menu
 
Create a new server and add details as shown below
 
null
Enter password created in last step and click OK
 
Create a new database by right clicking on Databases and choosing New Database enter the following details
null
Click OK
The database has now been install and needs to be configured before use to ensure Geo-referencing works.
Ensure the database is clicked and highlighted and from the main menu in pgAdmin click Plugins -> PSQL Console. A new terminal window will open add the following lines of code. Changing PostGIS directory and database name.
# CREATE schema gis;
# SET SEARCH_PATH TO gis, public, shark;
# \i ${POSTGIS_DIR}/postgis.sql
# \i ${POSTGIS_DIR}/spatial_ref_sys.sql 
# ALTER DATABASE ${DB_NAME} SET search_path="$user", shark, public, gis;
/q to exit
 
The system is now setup and configured for the installation of OpenMaint
 
 

 

Install openMAINT WAR

Download

http://www.openmaint.org/en/download/download
Click download from sourceforge
Once downloaded extract in downloads folder

Database restore

In pgAdmin right click on the newly created database and choose restore, and choose from the following database in openMAINT folder 
Demo, Empty, GIS or use a database you have saved before

Libraries

Copy libraries across to tomcat7 to do this we must rename “6.0 higher” to “6” in folder found below
 /home/osboxes/downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/
Simply type the following to copy a required file from openmaint folder to Tomcat7
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/6/postgresql-9.4.1207.jar /usr/share/tomcat7/lib

Download JDBC  (9.4.1212.jar) from ww.jdbc.postgresql.org/download.html

And as above copy to the tomcat7 lib folder

 

Sudo cp /home/osboxes/Downloads/postgresql-9.4.1212.jar /usr/share/tomcat7/lib
 

 


 

WAR files

Rename the two war files in openMAINT folder to openmaint and shark
Ensure the tomcat server is stopped
Move both war files to tomcat webapps folder
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/openmaint.war /var/lib/tomcat7/webapps/
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/shark.war /var/lib/tomcat7/webapps/
Start tomcat7 
This will automatically deploy the war files after a few minutes they should both be fully deployed. 
Log in to localhost:8080/manager to ensure both shark and openmaint are running, if all okay
log in to localhost:8080/openmaint
All being well the system should now be up and running and a few setup pages will now need to be completed
 
 
 
 
 
 

 

Setup openMAINT

The 1st one you simply choose a language and click next
null
Next step is the database screen this will connect to the newly installed and created user in postgresql
null
Choose database existing
Enter name as openmaint (If this is what you used above)
Database connection properties are as follows
Host: Localhost
Port: 5432
Super User: postgres
Password: Admin ß depends what was given in setup
Click test connection, if successful click finish and then click ok, you will now be ready to log in, using either admin admin or demouser
null
The system is now configured and simply needs a user name and password to be chosen for the super user (site admin)

 

 


 

Shark configuration

Stop the Tomcat7 service

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/META-INF/context.xml) per the manual. I change the URL to represent my database name. I don't change any other value. Screenshot: http://i.imgur.com/2Rw7g3D.png

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/conf/Shark.conf) per the manual. I change the org.cmdbuild.ws.url setting to equal my CMDBuild site address. I leave the usename and password as they were. I don't change anything else. Screenshot: http://i.imgur.com/cjkWEou.png

Edit (/var/lib/tomcat7/webapps/cmdbuild/WEB-INF/conf/auth.conf). I remove the comment from the line: serviceusers.prigileged=workflow. Screenshot: http://i.imgur.com/SAgIV0H.png

Start the Tomcat Server using sudo /etc/init.d/tomcat7 start.

Log in and enable the Workflow server and change URL to the Shark deployment. Do not change the username or password.

Create a new user named "workflow" if not already created with the password "changeme". This matches the default values for username and password in the Shark.conf file 

Change the owner of the Shark schema in the DB to the shark user. In case previously owned by the postgres user. Make sure Workflow user is only tied to one user group in the users model of OpenMAINT

Alfresco Document Management

If you require document management use the following online guides
Next step is install and connecting Alfresco used for document management

Use WordPress guides

http://dl.alfresco.com/release/community/build-3370/alfresco-community-3.4.d-installer-linux-x64.bin

https://kickingtech.wordpress.com/2014/05/26/alfresco-community-edition-4-2-step-by-step-manual-installation/
 
 
 
Previously Tas wrote:
It would be amazing if you could upload your notes. I've been trying to install Openmaint for my work for way too long and am getting frustrated! 
 
 
Previously Ken Malm wrote:

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

 

 

 

Dear Ken,
 
CAn you shae the step with picture for thes steps. Im also just liek Linux, so your step will be a big chagne for me:).
 
we can discuss through skype also:  rosebell47
 
THanks
Wesley
 
Previously Philip wrote:

Hi Ken,

I've been struggling for 3 days on trying to install this software. An ovf would be fantastic. How would I be able to get a hold of image?

 

Thanks,

Philip

 

 

 

Previously Marc wrote:
These are the notes I made to get OpenMAINT fully installed and working with all addons (GIS, Alfresco etc)
 
pictures are missing, not sure how to add a document, this is using Debian (Linux)

Installing openMAINT

 

Install Java

Once connected to server open a new terminal and type sudo apt-get update this will ensure Linux repositories are fully updated ready for install. Java 8, this is not in the repository so we need to add it and then update again to be able to install. Type the following command into the terminal

$ sudo nano /etc/apt/sources.list.d/java-8-debian.list

This will create a new document type the following two lines and save

deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

save the document and exit back to root

We now need to import the GPG key on your system for validate packages before installing can be done. Type the following commands

$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886

$ sudo apt-get install oracle-java8-installer

$ sudo apt-get install oracle-java8-set-default

Install Tomcat 7

We have to install Tomcat 7 over 8 as has greater stability, type the following into the terminal

$ sudo apt-get install tomcat7 tomcat7-admin

This will install Tomcat web server and the administration program


 

Configure Tomcat 7

Run performance tweaks on Tomcat installation above to improve performance

https://blog.layer4.fr/2013/09/03/installing-tomcat-7-on-debianubuntu/

Stop the tomcat7 service as we will be editing configuration files

$ sudo /etc/init.d/tomcat7 stop

Change tomcat 7 user and security settings now service has stopped

$ sudo nano /etc/tomcat7/tomcat-users.xml
 
add in-between <tomcat-users> … </tomcat-users>
 
<role rolename=”manager”/>
<role rolename=”manager-gui”/>
 
Create username and password for tomcat 
 
<user username=”admin” password=”admin” roles=”manager-gui, manager”/>
 
CTRL-O to save
CTRL-X to exit
 
$ 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 “TOMCAT6_SECURITY=no”

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


 

Install PostgreSQL and PostGIS

PostgreSQL 9.4 is the database openMAINT will use and PostGIS is for geo-reference. We need to add the repository to Linux before install 

$ sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main"

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

Once the above commands have been ran we can update Linux

$ sudo apt-get update

And finally install

$ sudo apt-get install postgresql-9.4 pgadmin3

Configure PostgreSQL

We have to change the super user password; follow commands below
Log in using $ sudo -u postgres psql template1
Once logged in run the below code
 
$ ALTER USER postgres WITH PASSWORD 'INSERT_PW_HERE'; 
 
The password entered must be remembered and kept secure
 
Exit out of PostgreSQL using $ \q
 
Open pgAdmin from menu
 
Create a new server and add details as shown below
 
null
Enter password created in last step and click OK
 
Create a new database by right clicking on Databases and choosing New Database enter the following details
null
Click OK
The database has now been install and needs to be configured before use to ensure Geo-referencing works.
Ensure the database is clicked and highlighted and from the main menu in pgAdmin click Plugins -> PSQL Console. A new terminal window will open add the following lines of code. Changing PostGIS directory and database name.
# CREATE schema gis;
# SET SEARCH_PATH TO gis, public, shark;
# \i ${POSTGIS_DIR}/postgis.sql
# \i ${POSTGIS_DIR}/spatial_ref_sys.sql 
# ALTER DATABASE ${DB_NAME} SET search_path="$user", shark, public, gis;
/q to exit
 
The system is now setup and configured for the installation of OpenMaint
 
 

 

Install openMAINT WAR

Download

http://www.openmaint.org/en/download/download
Click download from sourceforge
Once downloaded extract in downloads folder

Database restore

In pgAdmin right click on the newly created database and choose restore, and choose from the following database in openMAINT folder 
Demo, Empty, GIS or use a database you have saved before

Libraries

Copy libraries across to tomcat7 to do this we must rename “6.0 higher” to “6” in folder found below
 /home/osboxes/downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/
Simply type the following to copy a required file from openmaint folder to Tomcat7
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/6/postgresql-9.4.1207.jar /usr/share/tomcat7/lib

Download JDBC  (9.4.1212.jar) from ww.jdbc.postgresql.org/download.html

And as above copy to the tomcat7 lib folder

 

Sudo cp /home/osboxes/Downloads/postgresql-9.4.1212.jar /usr/share/tomcat7/lib
 

 


 

WAR files

Rename the two war files in openMAINT folder to openmaint and shark
Ensure the tomcat server is stopped
Move both war files to tomcat webapps folder
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/openmaint.war /var/lib/tomcat7/webapps/
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/shark.war /var/lib/tomcat7/webapps/
Start tomcat7 
This will automatically deploy the war files after a few minutes they should both be fully deployed. 
Log in to localhost:8080/manager to ensure both shark and openmaint are running, if all okay
log in to localhost:8080/openmaint
All being well the system should now be up and running and a few setup pages will now need to be completed
 
 
 
 
 
 

 

Setup openMAINT

The 1st one you simply choose a language and click next
null
Next step is the database screen this will connect to the newly installed and created user in postgresql
null
Choose database existing
Enter name as openmaint (If this is what you used above)
Database connection properties are as follows
Host: Localhost
Port: 5432
Super User: postgres
Password: Admin ß depends what was given in setup
Click test connection, if successful click finish and then click ok, you will now be ready to log in, using either admin admin or demouser
null
The system is now configured and simply needs a user name and password to be chosen for the super user (site admin)

 

 


 

Shark configuration

Stop the Tomcat7 service

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/META-INF/context.xml) per the manual. I change the URL to represent my database name. I don't change any other value. Screenshot: http://i.imgur.com/2Rw7g3D.png

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/conf/Shark.conf) per the manual. I change the org.cmdbuild.ws.url setting to equal my CMDBuild site address. I leave the usename and password as they were. I don't change anything else. Screenshot: http://i.imgur.com/cjkWEou.png

Edit (/var/lib/tomcat7/webapps/cmdbuild/WEB-INF/conf/auth.conf). I remove the comment from the line: serviceusers.prigileged=workflow. Screenshot: http://i.imgur.com/SAgIV0H.png

Start the Tomcat Server using sudo /etc/init.d/tomcat7 start.

Log in and enable the Workflow server and change URL to the Shark deployment. Do not change the username or password.

Create a new user named "workflow" if not already created with the password "changeme". This matches the default values for username and password in the Shark.conf file 

Change the owner of the Shark schema in the DB to the shark user. In case previously owned by the postgres user. Make sure Workflow user is only tied to one user group in the users model of OpenMAINT

Alfresco Document Management

If you require document management use the following online guides
Next step is install and connecting Alfresco used for document management

Use WordPress guides

http://dl.alfresco.com/release/community/build-3370/alfresco-community-3.4.d-installer-linux-x64.bin

https://kickingtech.wordpress.com/2014/05/26/alfresco-community-edition-4-2-step-by-step-manual-installation/
 
 
 
Previously Tas wrote:
It would be amazing if you could upload your notes. I've been trying to install Openmaint for my work for way too long and am getting frustrated! 
 
 
Previously Ken Malm wrote:

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

 

 

 

 

hi,

 

 I Have followed the same steps, but having issues with postgres:

 

while trying to restore demo data, im getting this error:

 

Error: File '' couldn't be removed (error 2: No such file or directory)

 

can anyone suggest a solution?

 

Regards.

 

Alan

I've tryied to perform installing a fresh centos7 install but sounds weird. no success.
Ready to play VM will be great.
I suggest you to
- open a pcloud account (4 free)
- upload the VM In there
- share public link
 
:)
 
Previously Ken Malm wrote:

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

 

My centos7 installing experience. But it will stop while restoring DB as lacks of data into backup... :(
 
 
 
simple steps to install OpenMaint on centos7/32

- disable, on test machine, the firewall or create
rules to open port 8080


yum install java -y
yum install tomcat -y

service tomcat7 stop
nano /etc/tomcat/tomcat-users.xml
service tomcat start
chkconfig tomcat on

yum install postgresql -y
yum install postgresql-server -y

service postgresql initdb 
    OR "postgresql-setup initdb"
   
service postgresql start
chkconfig postgresql on

sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'password';
\q

pgAdmin4 is not available in ANY rpm !! thus use webmin module inteface
 
webmin on centos: install module postgresql
DBI and DBD::Pg neede (at end of module page there is lnk to  update perl)


Create a new database by clicking on
Databases and choosing New Database
enter the db name

bname: what_you_want

http://www.openmaint.org/en/download/download
Click download from sourceforge

Once downloaded extract in downloads folder


In webmin module right click on the newly created database and choose restore, and choose from the following database in openMAINT folder

enter the database and press "RESTORE" then choose a db
Demo, Empty, GIS or use a database you have saved before
wait for restore process
 
DB restore fails lotta errors -  cannot proceed.
 

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 7; 2615 3751414 SCHEMA shark shark
pg_restore: [archiver (db)] could not execute query: ERROR:  role "shark" does not exist
    Command was: ALTER SCHEMA shark OWNER TO shark;

pg_restore: [archiver (db)] Error from TOC entry 760; 1259 3751415 TABLE objectid shark
pg_restore: [archiver (db)] could not execute query: ERROR: role “shark” does not exist
Command was: ALTER TABLE shark.objectid OWNER TO shark;

pg_restore: [archiver (db)] Error from TOC entry 761; 1259 3751418 TABLE qrtz_blob_triggers shark
pg_restore: [archiver (db)] could not execute query: ERROR: role “shark” does not exist
Command was: ALTER TABLE shark.qrtz_blob_triggers OWNER TO shark;

pg_restore: [archiver (db)] Error from TOC entry 762; 1259 3751424 TABLE qrtz_calendars shark
pg_restore: [archiver (db)] could not execute query: ERROR: role “shark” does not exist
Command was: ALTER TABLE shark.qrtz_calendars OWNER TO shark;

pg_restore: [archiver (db)] Error from TOC entry 763; 1259 3751430 TABLE qrtz_cron_triggers shark
pg_restore: [archiver (db)] could not execute query: ERROR: role “shark” does not exist
Command was: ALTER TABLE shark.qrtz_cron_triggers OWNER TO shark;

pg_restore: [archiver (db)] Error from TOC entry 764; 1259 3751436 TABLE qrtz_fired_triggers shark
pg_restore: [archiver (db)] could not execute query: ERROR: role “shark” does not exist
Command was: ALTER TABLE shark.qrtz_fired_triggers OWNER TO shark;

pg_restore: [archiver (db)] Error from TOC entry 765; 1259 3751442 TABLE qrtz_job_details shark
pg_restore: [archiver (db)] could not execute query: ERROR: role “shark” does not exist
Command was: ALTER TABLE shark.qrtz_job_details OWNER TO shark;

*********************************
yum install tomcat

Copy libraries from zip across to tomcat7
/usr/share/tomcat/lib

download Download JDBC  (9.4.1212.jar) from
https://jdbc.postgresql.org/download.html
choose this: 9.4.1212 JDBC 42
And as above copy to the tomcat7 lib folder
/usr/share/tomcat/lib

Ensure the tomcat server is stopped
Move both war files to tomcat webapps folder
/var/lib/tomcat/webapps

service tomcat start

This will automatically deploy the war files after a
few minutes they should both be fully deployed.

Log in to hostIP:8080/manager  [Error: white page grrrrr]
to ensure both shark and
openmaint are running, if all okay
log in to localhost:8080/openmaint [Error: white page grrrrr]
 
------------------------------------------------
 
Previously Tecnoteca wrote:
Dear Ken,
 
CAn you shae the step with picture for thes steps. Im also just liek Linux, so your step will be a big chagne for me:).
 
we can discuss through skype also:  rosebell47
 
THanks
Wesley
 
Previously Philip wrote:

Hi Ken,

I've been struggling for 3 days on trying to install this software. An ovf would be fantastic. How would I be able to get a hold of image?

 

Thanks,

Philip

 

 

 

Previously Marc wrote:
These are the notes I made to get OpenMAINT fully installed and working with all addons (GIS, Alfresco etc)
 
pictures are missing, not sure how to add a document, this is using Debian (Linux)

Installing openMAINT

 

Install Java

Once connected to server open a new terminal and type sudo apt-get update this will ensure Linux repositories are fully updated ready for install. Java 8, this is not in the repository so we need to add it and then update again to be able to install. Type the following command into the terminal

$ sudo nano /etc/apt/sources.list.d/java-8-debian.list

This will create a new document type the following two lines and save

deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

save the document and exit back to root

We now need to import the GPG key on your system for validate packages before installing can be done. Type the following commands

$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886

$ sudo apt-get install oracle-java8-installer

$ sudo apt-get install oracle-java8-set-default

Install Tomcat 7

We have to install Tomcat 7 over 8 as has greater stability, type the following into the terminal

$ sudo apt-get install tomcat7 tomcat7-admin

This will install Tomcat web server and the administration program


 

Configure Tomcat 7

Run performance tweaks on Tomcat installation above to improve performance

https://blog.layer4.fr/2013/09/03/installing-tomcat-7-on-debianubuntu/

Stop the tomcat7 service as we will be editing configuration files

$ sudo /etc/init.d/tomcat7 stop

Change tomcat 7 user and security settings now service has stopped

$ sudo nano /etc/tomcat7/tomcat-users.xml
 
add in-between <tomcat-users> … </tomcat-users>
 
<role rolename=”manager”/>
<role rolename=”manager-gui”/>
 
Create username and password for tomcat 
 
<user username=”admin” password=”admin” roles=”manager-gui, manager”/>
 
CTRL-O to save
CTRL-X to exit
 
$ 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 “TOMCAT6_SECURITY=no”

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


 

Install PostgreSQL and PostGIS

PostgreSQL 9.4 is the database openMAINT will use and PostGIS is for geo-reference. We need to add the repository to Linux before install 

$ sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main"

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

Once the above commands have been ran we can update Linux

$ sudo apt-get update

And finally install

$ sudo apt-get install postgresql-9.4 pgadmin3

Configure PostgreSQL

We have to change the super user password; follow commands below
Log in using $ sudo -u postgres psql template1
Once logged in run the below code
 
$ ALTER USER postgres WITH PASSWORD 'INSERT_PW_HERE'; 
 
The password entered must be remembered and kept secure
 
Exit out of PostgreSQL using $ \q
 
Open pgAdmin from menu
 
Create a new server and add details as shown below
 
null
Enter password created in last step and click OK
 
Create a new database by right clicking on Databases and choosing New Database enter the following details
null
Click OK
The database has now been install and needs to be configured before use to ensure Geo-referencing works.
Ensure the database is clicked and highlighted and from the main menu in pgAdmin click Plugins -> PSQL Console. A new terminal window will open add the following lines of code. Changing PostGIS directory and database name.
# CREATE schema gis;
# SET SEARCH_PATH TO gis, public, shark;
# \i ${POSTGIS_DIR}/postgis.sql
# \i ${POSTGIS_DIR}/spatial_ref_sys.sql 
# ALTER DATABASE ${DB_NAME} SET search_path="$user", shark, public, gis;
/q to exit
 
The system is now setup and configured for the installation of OpenMaint
 
 

 

Install openMAINT WAR

Download

http://www.openmaint.org/en/download/download
Click download from sourceforge
Once downloaded extract in downloads folder

Database restore

In pgAdmin right click on the newly created database and choose restore, and choose from the following database in openMAINT folder 
Demo, Empty, GIS or use a database you have saved before

Libraries

Copy libraries across to tomcat7 to do this we must rename “6.0 higher” to “6” in folder found below
 /home/osboxes/downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/
Simply type the following to copy a required file from openmaint folder to Tomcat7
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/extras/tomcat-libs/6/postgresql-9.4.1207.jar /usr/share/tomcat7/lib

Download JDBC  (9.4.1212.jar) from ww.jdbc.postgresql.org/download.html

And as above copy to the tomcat7 lib folder

 

Sudo cp /home/osboxes/Downloads/postgresql-9.4.1212.jar /usr/share/tomcat7/lib
 

 


 

WAR files

Rename the two war files in openMAINT folder to openmaint and shark
Ensure the tomcat server is stopped
Move both war files to tomcat webapps folder
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/openmaint.war /var/lib/tomcat7/webapps/
Sudo cp /home/osboxes/Downloads/openmaint-1.1-2.4.2/shark.war /var/lib/tomcat7/webapps/
Start tomcat7 
This will automatically deploy the war files after a few minutes they should both be fully deployed. 
Log in to localhost:8080/manager to ensure both shark and openmaint are running, if all okay
log in to localhost:8080/openmaint
All being well the system should now be up and running and a few setup pages will now need to be completed
 
 
 
 
 
 

 

Setup openMAINT

The 1st one you simply choose a language and click next
null
Next step is the database screen this will connect to the newly installed and created user in postgresql
null
Choose database existing
Enter name as openmaint (If this is what you used above)
Database connection properties are as follows
Host: Localhost
Port: 5432
Super User: postgres
Password: Admin ß depends what was given in setup
Click test connection, if successful click finish and then click ok, you will now be ready to log in, using either admin admin or demouser
null
The system is now configured and simply needs a user name and password to be chosen for the super user (site admin)

 

 


 

Shark configuration

Stop the Tomcat7 service

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/META-INF/context.xml) per the manual. I change the URL to represent my database name. I don't change any other value. Screenshot: http://i.imgur.com/2Rw7g3D.png

Edit (/var/lib/tomcat7/webapps/cmdbuild-shark/conf/Shark.conf) per the manual. I change the org.cmdbuild.ws.url setting to equal my CMDBuild site address. I leave the usename and password as they were. I don't change anything else. Screenshot: http://i.imgur.com/cjkWEou.png

Edit (/var/lib/tomcat7/webapps/cmdbuild/WEB-INF/conf/auth.conf). I remove the comment from the line: serviceusers.prigileged=workflow. Screenshot: http://i.imgur.com/SAgIV0H.png

Start the Tomcat Server using sudo /etc/init.d/tomcat7 start.

Log in and enable the Workflow server and change URL to the Shark deployment. Do not change the username or password.

Create a new user named "workflow" if not already created with the password "changeme". This matches the default values for username and password in the Shark.conf file 

Change the owner of the Shark schema in the DB to the shark user. In case previously owned by the postgres user. Make sure Workflow user is only tied to one user group in the users model of OpenMAINT

Alfresco Document Management

If you require document management use the following online guides
Next step is install and connecting Alfresco used for document management

Use WordPress guides

http://dl.alfresco.com/release/community/build-3370/alfresco-community-3.4.d-installer-linux-x64.bin

https://kickingtech.wordpress.com/2014/05/26/alfresco-community-edition-4-2-step-by-step-manual-installation/
 
 
 
Previously Tas wrote:
It would be amazing if you could upload your notes. I've been trying to install Openmaint for my work for way too long and am getting frustrated! 
 
 
Previously Ken Malm wrote:

I am not exactly a newbie when it comes to Linux, having used it since RedHat 5 in the late 90's. 

However, I am by no means an expert.  It's really just a tool and a way to avoid ongoing overhead. (e.g. "Micro$oft")

 

After much research, I decided that OpenMaint was the program I wanted to use to manage my maintenance issues in my office and at home.

 

At first I was not worried about the lack of good, detailed instructions because I often find myself melding different instructions from different people in order to get what I want.

 

Boy was I wrong!

 

It took 3 separate runs at installing it, many hours each, to even get it to come up and run.  I still have not really started using it, but I took detailed notes during my attempts and have reduced them down to something manageable.    These instructions are intended for someone who is, like me, familiar with Linux but is not a power user.   If I can figure out how to attach the text file to this forum, I will do so.  Otherwise I will add the notes as a post.

 

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

 

 

 

 

 

Previously Ken Malm wrote:

I installed it on clean CentOS 7 VM under XEN, so I even have a complete OVA image file available with the results of my install.  I don't have the bandwidth or a place to host a file that large, but if someone wanted to host it, I would be happy to provide it.  (The compressed image is about 4GB.)

 

Ken

Hi Ken
Is it possible to get the VM?
I m able to host such image. I´m not amused about the depencies of openmaint. I´m hoping, the software will be better ;-)
 
Sincerly Lars

In my postgresql when i restore empty.dump schemas from gis tables are not show
hoiw to solve or how to restore the dump in correct way

org.cmdbuild.dao.DaoException: error executing insert for entry = CardImpl{id=null, code=bbb, type=Building}, caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: function st_makepoint(double precision, double precision) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Where: PL/pgSQL function tt_gis_coordinates_to_position() line 13 at assignment, caused by: org.postgresql.util.PSQLException: ERROR: function st_makepoint(double precision, double precision) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Where: PL/pgSQL function tt_gis_coordinates_to_position() line 13 at assignment

  1. install PostGIS into PostgreSQL engine
  2. log into the DB with your CMDBUILD user, run the following SQL queries:
    create schema gis;
    create extension postgis schema gis;
    SET SEARCH_PATH TO gis, public, shark;

Thank you ADM my problem is solved