Install Maximo 7.6.1 on Ubuntu, Websphere Liberty, and Oracle Express database

Install Maximo 7.6.1 on Ubuntu, Websphere Liberty, and Oracle Express database

I am starting with an objective to create a relatively faster and lightweight development VM for Maximo 7.6.1. To cut down on the size and hopefully gain bit more speed, I am going to use the following components:
Operating SystemUbuntu 16.04.5 LTS (64-bit)
DatabaseOracle 11g Express Edition
Application ServerWebsphere Liberty 18.0.0.2
Virtual Machine MonitorVirtualBox

Another advantage of using the above components is they are available for free. No license required!

The download size for Oracle 11g Express edition is 301 MB in comparison to 2.5 GB for Enterprise edition. Similarly, Websphere download size is 7.2 GB, whereas Liberty is only 80 MB.

The installation will have only stages:

  1. Install Ubuntu on VirtualBox VM
  2. Install Maximo
  3. Install Oracle Database Express Edition (XE)
  4. Create MAXIMO database user
  5. Initialize Maximo Database
  6. Build Maximo deployment files
  7. Install WAS Liberty profile
  8. Deploy on Liberty
  9. Run Maximo

1- Install Ubuntu on VirtualBox VM

1.1- Download Ubuntu

As per Maximo compatibility matrix, only Ubuntu version supported is 16.04 LTS 64-bit. The required version can be download from here: http://releases.ubuntu.com/xenial/

The file I downloaded is ubuntu-16.04.5-desktop-amd64.iso

1.2- Create Virtual Machine
  • Create a virtual machine in VirtualBox with the following settings:
RAM4 - 16 GB (It depends on your hardware, I gave it 16 GB)
Processor1 - 4 (Again depends on your hardware)
Hard Drive size25 GB or more (select 'dynamically allocated' so that it doesn't take space unless required)
  • Choose downloaded Ubuntu ISO image into the Optical Drive:
  • Start the VM and follow along to install Ubuntu:

Click ‘Install Ubuntu’ and select ‘Erase disk and install Ubuntu’ on the next screen. Moreover, I deselected the option to ‘Download updates while installing’.

Just a few clicks and Ubuntu is ready.

  • Install Guest Additions and restart the machine.
  • Turn on clipboard between host and guest.
1.3- Create shared folder between host and guest
  • Create shared folder using VirtualBox machine settings. Make it permanent and auto-mount.
  • Restart the machine.
  • Grant access to the shared folder running this command on terminal
$ sudo usermod -aG vboxsf userName
The shared folder should show up in /media directory with sf prefix.
1.4- Enable root login in Ubuntu
First, create the password for root user and then enable the option on the login screen to enter any username.
$ sudo passwd root
$ sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'

2- Install Maximo

2.1- Download Media

Find out the required media files from this link: http://www-01.ibm.com/support/docview.wss?uid=swg24044945

I have downloaded the product only which is MAM_7.6.1_LINUX64.tar.gz (also referred as CNU8YML.tar.gz)

PlatformComponentRequired Files
Linux 64Maximo Asset Management 7.6.1 (product only)CNU8YML.tar.gz
2.2- Downgrade Firefox to version 42
Maximo Launchpad uses a GUI technology, called XUL, which was last supported by Firefox version 42. Here are a couple of links which talk more about the issue: Following are the steps to downgrade Firefox to version 42: The file I have got is firefox-mozilla-build_42.0-0ubuntu1_amd64.deb
  • Find the installed version(s) of Firefox
$ sudo apt list --installed | grep -i firefox
  • I have found two versions installed on my machine. Let’s remove both of them:
$ sudo apt-get remove firefox-mozilla-build
$ sudo apt-get remove firefox-locale-en
  • Install the downloaded Firefox
$ sudo dpkg -i firefox-mozilla-build_42.0-0ubuntu1_amd64.deb
2.3- Start Maximo Launchpad
  • Log in as root user
  • Extract the downloaded Maximo media file,
    MAM_7.6.1_LINUX64.tar.gz
  • Change directory to the extracted folder and start Launchpad
# ./launchpad.sh
  • Deselect DB2 and Webphere
Complete the installation process and close the configuration tool window which appears afterward.

3- Install Oracle Database Express Edition

Download Oracle Express edition from here: http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

The file I downloaded is oracle-xe-11.2.0-1.0.x86_64.rpm.zip

For installation, follow the instruction here: https://askubuntu.com/questions/566734/how-to-install-oracle-11gr2-on-ubuntu-14-04

I went with all default options except for following I choose port 8880.

Specify the HTTP port that will be used for Oracle Application Express [8080]: 8880

4- Create MAXIMO Database user

Make sure the database service is started

$ sudo service oracle-xe start
Login to database as sysdba
$ sqlplus sys as sysdba

Alter Oracle initialization parameters

sql> alter system set CURSOR_SHARING=FORCE;
sql> alter system set NLS_LENGTH_SEMANTICS=CHAR;
sql> alter system set OPEN_CURSORS=1000;

Create MAXIMO user if haven’t done already

sql> create user maximo identified by maximo;

Grant required privileges to MAXIMO user

sql> grant connect, resource to maximo;
sql> grant create job to maximo;
sql> grant create trigger to maximo;
sql> grant create session to maximo;
sql> grant create sequence to maximo;
sql> grant create synonym to maximo;
sql> grant create table to maximo;
sql> grant create view to maximo;
sql> grant create procedure to maximo;
sql> grant alter session to maximo;
sql> grant execute on ctxsys.ctx_ddl to maximo;
sql> grant execute on DBMS_XA to maximo;
sql> grant select_catalog_role to maximo;

Create Tablespaces – MAXDATA and MAXINDEX

sql> CREATE TABLESPACE MAXDATA 
        DATAFILE 'max_data_perm_01.dat'  
        SIZE 100M REUSE AUTOEXTEND ON NEXT 50M MAXSIZE 2000M;
sql> CREATE TABLESPACE MAXINDEX 
        DATAFILE 'max_index_perm_01.dat'  
        SIZE 100M REUSE AUTOEXTEND ON NEXT 25M MAXSIZE 1000M;

Allow MAXIMO to use newly created Tablespaces

sql> alter user maximo default tablespace MAXDATA temporary tablespace temp;
sql> alter user maximo quota unlimited on maxdata;
sql> alter user maximo quota unlimited on maxindex;

In case, we need to resize the tablespace beyond the maximum size in future, it can be done using the following command:

alter database datafile 'max_data_perm_01.dat' autoextend on next 50M MAXSIZE 2G;

5- Initialize Maximo Database

First, I have to change maximo.properties file so that Maximo tools can connect to the database.

Let’s copy the original file to the properties folder.

$ cd /opt/IBM/SMP/maximo/applications/maximo/properties/maximo.properties.orig
$ sudo cp maximo.properties /opt/IBM/SMP/maximo/applications/maximo/properties/

Edit the connection string in maximo.properties file at /opt/IBM/SMP/maximo/applications/maximo/properties/ to include database connection properties. Only need to change mxe.db.url, rest should already have correct values.

mxe.db.url=jdbc:oracle:thin:@localhost:1521:XE
mxe.db.driver=oracle.jdbc.OracleDriver
mxe.db.user=maximo
mxe.db.password=maximo

Run MAXINST tool. It will create all the tables, data and other objects in the database (will take a while).

$ cd /opt/IBM/SMP/maximo/tools/maximo
$ sudo ./maxinst.sh -sMAXINDEX -tMAXDATA -imaximo

Above command will create an empty database. If we also need to include demo/training data, then run the following instead:

$ cd /opt/IBM/SMP/maximo/tools/maximo/en
$ sudo unzip maxdemp.ora.zip
$ cd /opt/IBM/SMP/maximo/tools/maximo/
$ sudo ./maxinst.sh -sMAXINDEX -tMAXDATA

6- Build Maximo deployment files

Maximo 7.6.1 comes with new tools for building Maximo for liberty. Maximo is built into 7 application bundles which are deployed as separate servers on Liberty (except maximo-ui and maximo-x which are deployed together).

More details about Maximo application bundles for Liberty can be found here.

Following are the commands for building mandatory Maximo bundles (see the fixes below before running this).

$ cd /opt/IBM/SMP/maximo/deployment/was-liberty-default
$ su
# ./buildmaximoui-war.sh
# ./buildmaximo-xwar.sh
# ./buildmaximocron-war.sh

DOS line endings error:

While running the ./buildmaxmoui-war.sh I got the following error:

bash: ./buildmaximoui-war.sh: /bin/sh^M: bad interpreter: No such file or directory

This error is due to Windows/DOS file endings on Linux.

To fix it, open the script with vi or vim and enter in vi command mode (key Esc) and type this:

:set fileformat=unix

Then save it

:x! or :wq!

Open file in vi/vim again, see if there are any ^M characters appearing. If found, remove ^M characters manually and save.

XMLChar class not found error:

Build works fine without this fix but Maximo is not able to start complaining about missing XMLChar class. To fix it, comment out the following line in buildmaximoui.war.xml and buildmaximocron-war.xml

<!--<exclude name="xercesImpl-2.7.1.jar"/> -->

Missing tools.jar:

Build command shows a warning that tools.jar is missing. To fix it, run the following:

$ su
# cd /opt/IBM/SMP/maximo/tools/java
# mkdir lib
# cd /opt/IBM/SMP/maximo/applications/maximo/lib
# cp tools.jar /opt/IBM/SMP/maximo/tools/java/lib/

Run the build commands given above after applying the fixes.

7- Install WAS Liberty profile

This is pretty straight-forward: just download from the link and unzip :

https://developer.ibm.com/wasdev/downloads/download-latest-stable-websphere-liberty-runtime/

The file I got is wlp-webProfile8-18.0.0.2.zip

8- Deploy on Liberty

Change to the directory where Liberty is extracted and run this command to create server

$ bin/server create maximo-ui-server
$ bin/server create maximo-cron-server

Copy Maximo war files to liberty server folder:

  • Copy the contents of /opt/IBM/SMP/maximo/deployment/was-liberty-default/deployment/maximo-ui/maximo-ui-server over to /home/syed/wlp/usr/servers/maximo-ui-server
  • Copy the contents of /opt/IBM/SMP/maximo/deployment/was-liberty-default/deployment/maximo-cron/maximo-cron-server over to /home/syed/wlp/usr/servers/maximo-cron-server

Following is to install the dependencies for the two bundles:

$ bin/installUtility install maximo-ui-server
$ bin/installUtility install maximo-cron-server

9- Run Maximo

Start the liberty server

$ bin/server start maximo-ui-server
$ bin/server start maximo-cron-server

Finally, Maximo is up and running!

The total size of VM is about 18 GB.

Leave a Reply

Your email address will not be published.