Monday, August 2, 2010

Installation of Pentaho for Ubuntu 10.04

Original installation (under Ubuntu 9.04) manual on: http://blog.foobaria.com/2010/05/install-pentaho-data-integration-aka.html

Install Sun Java 6

  1. First think we need to do is install Sun Java 6. Use the Sun-JDK, because this is the JDK that is supported by Pentaho team (or any other JDK that passes the Java standard compliance tests.

    To check if it is installed run:

    $ sudo update-java-alternatives --list

  2. If you dont have the command update-java-alternatives run:

    $ sudo apt-get install java-common

  3. After Ubuntu's decision to default to OpenJDK for 10.04, Sun's JAVA somewhat "disappeared" from Ubuntu (multiverse). Actually, Ubuntu is still shipping it, but in its "partner" section. To add that section to your Sources and install Sun's JDK (as an example), just:

    $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    $ sudo apt-get update

    As a side note, remember to remove OpenJDK (or make it not the default JVM) if you do not need it, or be prepared to encounter hard to diagnose problems sometime.

  4. After running update-java-alternatives --list (if Sun Java 6 is already installed) you will have a line that starts with java-6-sun as part of the output.

    If you don't see the line telling you have JVM installed execute the next command (it requires 229MB):

    $ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk sun-java6-plugin sun-java6-fonts ant

    You need to accept the license.

  5. Select Sun Java 6 as default jre/sdk:

    $ sudo update-alternatives --config java

Setup Java home

  1. You also need to setup JAVA_HOME and PATH variable. Open your $HOME/.bashrc configuration:
    $ gedit $HOME/.bashrc

  2. And add the following lines at the end of the file:
    export JAVA_HOME=/usr/lib/jvm/java-6-sun
    export PATH=$PATH:$JAVA_HOME/bin

Install Pentaho Kettle 3.2.2

  1. For this step you need to have subversion comandline tool installed. If you don't have it run:
    $ sudo apt-get install subversion

  2. Create a temporary directory to build kettle:

    $ mkdir /tmp/kettle_src
    $ cd /tmp/kettle_src


  3. Export Kettle stable source code from the project repository:
    $ svn export http://source.pentaho.org/svnkettleroot/Kettle/tags/3.2.2/ kettle
    $ cd kettle/


  4. Comment JAVA_HOME on the top of autobuild.sh file.

    To do that run:

    $ gedit autobuild.sh

  5. And search for the lines:
    JAVA_HOME=/usr/java/j2sdk1.4.2_13
    export JAVA_HOME


  6. And comment them out (add a character # in front of the 2 lines of the previous item to have something like):

    #JAVA_HOME=/usr/java/j2sdk1.4.2_13
    #export JAVA_HOME


  7. To build Kettle run:
    $ chmod +x autobuild.sh
    $ source $HOME/.bashrc
    $ ./autobuild.sh


  8. In this example we are installing Kettle for your current user in $HOME/opt/kettle, but you can change this location to any location you like.

    For example to: /opt/kettle or /usr/local/kettle

    $ mkdir $HOME/opt
    $ mv distrib/ $HOME/opt/kettle
    $ chmod +x $HOME/opt/kettle/*.sh


  9. Remove Kettle source files:
    $ cd
    $ rm -R /tmp/kettle_src

Setup Pentaho Kettle

  1. Add Kettle directory to PATH variable. To do so open your $HOME/.bashrc file:

    $ gedit $HOME/.bashrc

  2. And add the following line at the end of the file:
    export PATH=$PATH:$HOME/opt/kettle

  3. Update terminal environment to read new PATH:

    $ source $HOME/.bashrc

  4. Now you can run Spoon GUI application executing:

    $ spoon.sh

  5. Pan and Kitchen can also be executed running command pan.sh or kitchen.sh.

Originaly by Jeronimo Albi. Updated by Vytautas Dvaronaitis

5 comments:

  1. Thankyou - worked exactly as described!

    ReplyDelete
  2. a nice clear guide - thanks

    ReplyDelete
  3. I get this when i try and run Spoon.sh

    Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getMethod0(Class.java:2670)
    at java.lang.Class.getMethod(Class.java:1603)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:132)
    Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Composite
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 5 more


    Any idea what I'm missing?

    ReplyDelete
  4. I've got Ubuntu 10.10, I follow your guide (with the updated repository on point 3) but I've got this error:

    Exception in thread "main" java.lang.ClassNotFoundException: org.pentaho.di.ui.spoon.Spoon
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:128)

    any ideas?

    thanks!

    ReplyDelete
  5. A likely scenario, following the instructions verbatim is that you may encounter an error of not able to find tools.jar. If you do, please read the following and do as instructed. It works fine. But for that very useful and clear instructions..

    Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.24/lib/tools.jar
    Buildfile: build.xml


    Now this what you do..

    Get the Sun JDK sudo apt-get install sun-java6-jdk then run sudo update-alternatives --config java and select the option that has the path /usr/lib/jvm/java-6-sun/jre/bin/java

    ReplyDelete