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.
Prerequisites
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".
http://localhost:8080
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"?> <tomcat-users> <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"/> </tomcat-users>
Take note of the username and password entry. You'll need it when accessing the manager webapp at
http://server_IP:8080/manager/html
andhttp://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 http://jdbc.postgresql.org/do…/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 https://downloads.sourceforge.net/project/openmaint/1.1/openmaint-1.1-2.4.2.zip
Once you have downloaded the package, then extract it, enter the directory, and copy the libraries in 'extras/tomcat-libs' using below commands.
# unzip openmaint-1.1-2.4.2.zip
# 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 "org.cmdbuild.ws.url" 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:
http://locahost:8080/openmaint
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
Username:demouser Pass: demo
Username:demouser Pass: demo
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.
Conclusion
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.
Tidak ada komentar:
Posting Komentar