Computersight > Software

How to Install Mondrian - The Complete Guide

So, do you have a huge amount of data and you can't analyze it because of poor performance? All you have to do is simply install Mondrian and the magic begins. Only simply is not the right word to describe Mondrian's installation.

As a programmer, when I encounter a tool like Mondrian I want to cry with joy. I want to sing (actually this is what I do) and dance from happiness. The reason is, it saves me a lot of time and frustration programming it by myself.

With Mondrian, all you have to do is describe what do you want to see and how and it will make the hard work for you.

Mondrian is an open source OLAP server which was developed by Pentaho and is free to use. All you need to do is download and install, learn how to use it and start rocking. The only problem is that installing Mondrian is a very, very unintuitive, frustrating task that is not well documented. You need to be very stubborn to succeed. The installation guide that Pentao provides does not reveal the whole picture and I had to hunt for information all over the web until I slowly managed to install it, hence I wrote this guide to shed some light on the task.

Two things before we start:

  • I assume that you have already installed and are using mysql (otherwise why would you need OLAP for?) but in case you haven't, download and install Mysql
  • I use Linux so i will write my examples for Linux.

OK, Lets start:

  1. Mondrian was written in Java. If you don't have Java, download JDK and install it.

    I have downloaded the RPM file. The command is : rpm -ivh rpm-file-name

  2. Download Tomcat and Install tomcat.

    I have downloaded the tar.gz file. the command is: tar -xzvf tar.gz-file

  3. Move Tomcat under /usr/local/tomcat
  4. Go to /usr/local/tomcat/bin. There you can find the files for activating and deactivating tomcat:
    • ./startup.sh - activates
    • ./shutdown.sh - dactivates

    Run the ./startup.sh to activate tomcat.

  5. Download Mysql JDBC driver and unzip it.
  6. Verify that so far all installations were successful
    • Test java : java - version
    • Test mysql : mysql -V
    • Test tomcat : If the ./startup.sh command went well you can go to the browser and type http://localhost:8080 and you will be able to see the tomcat welcome page which look like this :
  7. Download the last version of Mondrian and unzip it to /usr/local/mondrian. The result will be a new directory containing all Mondrian files. the name of directory will be mondrian-x.y.z.
  8. Create mondrian directory under /usr/local/tomcat/webapps/ and move mondrian.war to there.

    The result will look like this : /usr/local/tomcat/webapps/mondrian/mondrian.war

  9. Explode mondrian.war

    command : jar -xvf mondrian.war

  10. Move the JDBC connector jar file mysql-connector-java-[ver]-bin.jar under /usr/local/tomcat/webapps/mondrian/WEB-INF/lib
  11. The next step will be to create the FoodMart mysql database for the example application.

    use this commands:

    • shell> mysql
    • mysql> create database foodmart;
    • mysql> create user "foodmart"@'yourhost' identified by "foodmart";
    • mysql> grant all privileges on *.* to "foodmart"@'yourhost' identified by "foodmart";
  12. Now, run the FoodMartLoader application to load the Foodmart database with data. It is important to pass the full path to all jar files and remove all spaces from the class path. Otherwise it fails for ClassNotFound or all kind of other errors.

    command should look like this:

    java -cp "/usr/local/tomcat/webapps/mondrian/WEB-INF/lib/mondrian.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/log4j-1.2.9.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-xom.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-resgen.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-properties.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar" mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes -jdbcDrivers=com.mysql.jdbc.Driver -inputFile=/usr/local/mondrian/demo/FoodMartCreateData.sql -outputJdbcURL="jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart"

  13. Copy xalan.jar to tomcat/common/endorsed.

    command : cp /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/xalan.jar /usr/local/tomcat/common/endorsed

  14. Go to /usr/local/tomcat/webapps/mondrian/WEB-INF and modify web.xml and datasources.xml files as appropriate. The driver value should be : JdbcDrivers=com.mysql.jdbc.Driver
  15. Go to /usr/local/tomcat/webapps/mondrian/WEB-INF/queries and modify all query files connect strings as appropriate.
  16. export CATALINA_OPTS='-Djava.awt.headless=true' or add to your shell profile, this stops tomcat dying when X-windows is not found.

Congratulations. Now you are ready to run mondrian. Point your browser to : http://localhost:8080/mondrian and you will get this screen:

I hope that this guide will make life easier for you. I also want to give credit to this blog which helped me a lot.

Here are some useful links which can help you start learning this world:

Good luck and enjoy the Mondrian magic.

8
Liked It
I Like It!
Related Articles
Linux Beginner's Guide  |  Do It Yourself Computer Repair Series: Hard Drive Cloning
Latest Articles in Software
Why Use Open-source Software?  |  Top Open Source Picks of 2008
Comments (1)
#1 by Jill, Apr 16, 2008
Nice article and tips...

and I thought my company's programmers were the only ones who sing about things like this... well, sing, and play flutes... programmers can be one crazy bunch
Post Your Comment:
Name:  
Copy the code into this box:  
Post comment with your Triond credentials?
Inside Computersight

Communication & Networks

 /

Computers

 /

Hardware

 /

Operating Systems

 /

Programming

 /

Software


Popular Tags
Popular Writers
Powered by
Computersight
About Us
Terms of Use
Privacy Policy
Services
Submit an Article
Advertise with Us
Contact

© 2007 Copyright Stanza Ltd. All Rights Reserved.