Saturday, December 20, 2008

Setup Pentaho Design Studio for Linux and Test your installation

1- Setup Design Studio as an Eclipse plugin
At this time, there is no complete Design Studio available for Linux and Mac users. Once you have installed your Java environment, your environment variables, and the BI server, you can now install the Eclipse IDE and the plugin for Pentaho Design Studio. You can find the last version of Eclipse IDE with your Synaptic Package Manager, but the Pentaho Design Studio Release for Community can be downloaded from the Pentaho website or directly from sourceforge.net.
In the zip file, go to the plugins folder and extract the following files:
  • org.pentaho.designstudio.editors.actionsequence_2.0.0.974
  • org.pentaho.designstudio.editors.core_2.0.0.616

  • org.pentaho.designstudio.editors.reportwizard_2.0.0.1037
Move these folders to usr/lib/eclipse/plugins folder so that the plugins will be found by Eclipse. But you need first get the permission to write in the plugins folder. You can do it by giving yourself the ownership of this folder which I found is the easiest way or by changing permissions settings. The following command gives yourself the ownership of the plugins folder in Eclipse:

From usr/lib/eclipse directory, type in:

sudo chown plugins

username represent your current username. Copy the 3 previous files in your Eclipse plugin folder.

2- Create a Solution Project

Start Eclipse. Got to File > New > Project. (My Eclipse version is the 3.2.2). Expand General and select Project, click Next. Type Pentaho Solutions as the project name.

Uncheck the Use the Default Location, and Browse to your BI server installation folder > pentaho-solution. In the Package explorer, you will be able to see the content of your project.

3- Test an Hello World Action Sequence

In the left-hand tree, expand bi-developers > getting-started. Double-click HelloWorld.xaction.

In the Pentaho Server URL text box, type your BI server address which normally is: localhost:8080/pentaho. Click the Test Server button and the server login page should appear in the built-in web browser.

Log in as the Joe(admin), the password field is filled automatically. You will be redirected to the Pentaho admin page.

Click the Generate URL button and then click Run to open the HelloWorld.xaction page. You should have the following result.

4- Change the HelloWorld Action Sequence

Click the Define Process tab and select Hello World. In the message drop-down list box, change the "%quote" to "-I did it". As your BI server uses the DB-base solution repository, action sequences are run from the database repository. You need to tell the server to refresh the database. Go back to the test tab; you will be prompted to save your changes to your Action Sequence. Click Yes.
Go back to the admin page at localhost:8080/pentaho.
Click Tool > Refresh > Repository Cache.
A message box information will tell you that the refreshing has been successful.

Click the Generate URL button and then the Run button to display the result of the action sequence. The new page will display: Hello World - I did it.

Setup the new BI server 2.0 in Linux-Ubuntu

1- Setup the Java environment
This new BI server version 2 installation and using is really more straightforward. You first need to install the last version of the Java Development Kit or Java Runtime Environment from the Synaptic Package Manager. To do this, go to System > Administration > Synaptic Package Manager. You will be prompted for your administrator password before the package manager window open.
Look for the sun-java6-jdk. Right-click and select Mark for Installation. Then click the Apply button in the toolbar. The Synaptic Package Manager will download all the necessary files and take care of the installation process automatically.

2- Setup the environment variables
You only need to setup to environment variable JAVA_HOME and JRE_HOME and make them persistent.
In you .profile file in your folder (this file is normally hidden), add the 2 following lines:
  • export JAVA_HOME=/usr/lib/jvm/java6_xxx
  • export JRE_HOME=/usr/lib/jvm/java6_xxx/jre
Then from your terminal, go to your BI server folder that you have downloaded (I dowloaded this file version for the matter of this tutorial: biserver-ce-2.0.0-RC1.tar.gz) and unzipped in your user folder. Then from the terminal window, go to your new installation folder and from there, you can start your BI server with the following command:
./start-pentaho.sh
To stop it, type in:
./stop-pentaho.sh
As you will see, this Community Release of the BI 2.0 server is embedded with hsqldb as the database server with some sample data and Apache Tomcat as the application server.

Friday, December 12, 2008

How To Make your Pentaho BI Server Accessible from your LAN

Pentaho 1.7 GA comes with JBoss as the Application Server by default. To make your server accessible from your LAN, you will need to modify your server.xml and your starting and stopping script.

1- Modify your server.xml file

In your JBoss folder, go to server > default > deploy >jboss-web.deployer >server.xml.

Change the address attribute of your connector tag to your server IP address:



2- Modify your scripts
In your start-pentaho script, add the following parameter in the line that starts the JBoss server:
-b 192.168.1.108 (The IP address should be your server IP address).
at this line /home/blutch009/pentaho/bi-server/jboss/run.sh -b 192.168.1.108
This line starts your JBoss AS and binds it to your server IP address so that it can be accessible from within your LAN at the port specified in your server.xml file (8080 by default).
In your stop-pentaho script, add your server IP address at this line after -S:
pentaho/bi-server/jboss/bin/shutdown.sh -S 192.168.1.108

Sunday, December 7, 2008

Setup a Host Interface Adapter with a Wireless internet connection in Virtual Box

In one of my previous post, I showed how to create a virtual network using the Host Interface Adapter mode with Virtual Box. This mode (compared to the Network Adapter Translation mode) allows your host and your guest having two different IP address but in the same network, so you can ping one to the other. Nevertheless, Host Interface Adapter mode does not support wireless internet connection.
To get internet access from your wireless connection in your box:

1- You need to setup manually your guest IP address
But make sure to make it different from your host. If your guest is running Linux Ubuntu, go to System > Administration > Network.
Click the Unlock button then you are prompted to add your administration password.
In the Connections tab, select your wired connection and click Properties.


Uncheck the Enable Roaming Mode checkbox. In the Configuration drop-down list, select Static IP address. Define the other parameters according to your Local Area Network configuration.
You will also need to update your DNS information which is going to be your default gateway. Go to System > Administration > Network.
Click the Unlock button and type in your root password. Go to the DNS tab and click Add in the DNS Servers list.
Add your default gateway IP address and delete your former DNS server. Click Close.
2- Enable Network Layer 3 Compatibility
Use the netsh command from the windows terminal to force your bridge components network layer 3 compatibility, that is allow your bridge adapters be configured in promiscuous mode.
Promiscuous mode means that the network adapter passes all the packets it received to the Central Unit Process rather than filtering only the packets addressed to its MAC (Media Access Control) address. This can become an threat for your network security.
For the Host Interface Adapter mode, it allows wireless connection in a bridge receive and process packets from outside network as well as any other network adapters in the bridge. First, use the following command to retrieve the adapter ID of your bridge members:
netsh bridge show adapter
You need to launch your terminal window as an administrator (right-click and Run as an administrator) in Windows 2003 and Vista.
Once you have the adapter ID for each members of your bridge, type the following command for each of your adapter:
netsh bridge set adapter 1 forcecompatmode=enable
You should come with the next window after typing in netsh bridge show adapter again.



Now you should have 2 different IP address for your guest and your host within the same network, you can ping from one to the other.
If your host is a Windows system, you need to disable Windows firewall first to allow your guest pinging your host.

Sunday, November 23, 2008

Setup Pentaho 1.7 GA

Pentaho BI 1.7 GA is the open-source Business Intelligence suite that allows you to report, analyse and manage data through E.T.L process. You can download the full BI suite installer for Linux at this link.

1- Setup MySQL database server and client
Pentaho 1.7GA installer comes with MySQL with the databases used for repository, so you don't normally need to setup the database server. But I found it necessary though, as I could not access the database server content with MySQL client if the database server is setup with BI server.

2- Make the Installer file executable
To setup the BIN installation file, open a terminal window and go to the folder you place in your BIN file.
Make sure first your BIN file is executable with the following command:
chmod +x pentaho-1.7GA-linux-opensource-installer.bin

3- Setup the BI suite
Then from the terminal window, type:
./pentaho-1.7GA-linux-opensource-installer.bin
The installation wizard launch in a new window.



Click Forward. Accept the Agreement and click Forward.
Select the component you would like to be installed.


Click Forward. Then select the Easy installation option.


This Easy installation set up MySQL as the default database repository and JBoss as the application server. Click Forward.


Click Forward. The next window allows you to choose for your MySQL database installation option.


Choose the 2nd option to use the database server already setup in your system and let the Installer create the repository.


You can change the MySQL Binary Directory to /usr/bin which is the default location of the database server executive file for Ubuntu, Debian and Fedora distributions.
The next window asks you to setup your MySQL root user information.


Click Forward. The next window asks you to provide a name for your Solution Repository. The default name provided is "hibernate".


The next window asks you to provide a name for your Quartz Repository.
After clicking Next, you are asked to provide a name for your SampleData Repository. Then, the next window asks for a username and password to access your repository databases.

You can click Forward to have the Summary for your installation. Click Forward again to confirm your choices. The setup process will start.


To run the BI server, from a command prompt, you go the path where your application is installed and then type the following command:

./start-pentaho.sh

You can access your BI dashboard from your browser at the following address:

http://localhost:8080/pentaho
















Saturday, November 8, 2008

Virtual Networking with xVM 2.0.4

With Virtual Box 2.1.4 and later version, the process has been simplified.

Even though Sun's documentation provided with the software is full of useful detailed information, it might take some time to read and understand everything if you want to quick setup a virtual networking. Once you have first setup a xVM guest, a default network adapter is automatically created with the Network Translation Address mode and will allow you to use the Internet and other network connections of your host. This mode does not require configuration and the xVM will act like a router between your host and your guest; your guest will receive an IP address. But this IP address will be on a completely different network than your host, and like any host in a private network, the (xVM) guest will be invisible from the outside network. (Unless you use the Port Forwarding functionality, which requires some command-line configuration and also still have limitations.) If you need to setup a (Web/Application) server on your guest, you can choose the Host Interface Networking mode. This mode will create a brand new Networking Interface (for your guest) in your host computer.

Warning: Setting up this mode will cause your host to lose its network connection temporarily. Because of that, do not do this on a production server unless you are aware of what you are doing on remote access or on remote access as you will lose your connection.

Network bridging is the most simple method for Host Interface Networking mode. Bridging allows you to connect several network devices together (in software), so that data sent to one of the device will be sent to all of them. Sun's documention mentions that network bridging only works for wired connection, but you will need additional settings to make it works with a wireless network adapter.
How to Configure a Host Interface Network with Vista (host) and Linux Ubuntu (guest)

1- Setup the Network Interface
From the xVM window click Settings and click Networking in the left list.Select the Interface 1 tab, check Activate Networking Interface. Select PCnet-FASTIII as the Interface Type. Sun's documentation explains the differences between those different interface types.
In the Host Network Interface, click the "Add a new interface" button in the right.

2- Create the Bridge from Windows Vista as a the host side.

From Windows Vista, go to Control Panel > Network and Sharing Center > Manage Network Connection.You can see in the list the Network Interface you have configured earlier. Control select the Virtual Box Interface and your Network Connection. Right-click and choose Bridge Connection.

You will have a new icon called Network Bridge in your Network Connections window.

Right-click the Network Bridge and go to Properties.




Click OK to apply your new change.

You now have your virtual network setup between your host and your guest.

Friday, November 7, 2008

Create a shared folder between a Windows Vista host and Ubuntu guest with Virtual Box 2.0.4

It can be useful to share some part of your host file system with your guest and Sun Virtual Box allows you to do that through Shared Folders. The documentation provided in the pdf is a good one but lack a step that can make you lose some of your precious time. So, I decided to blog the steps I used to create a shared folder between a Windows Vista host and a Ubuntu Hardy Heron guest.

1- If your guest is running, you can go to the Settings menu and choose Shared Folders. Otherwise, you click the Settings button in the xVM window. The following window appears:

2- Click the Add a New Shared Folder button in the top right corner of the window.




From the first field, you can add the path to the folder you want to share from your host system. Then, you have to specify a name for this sharing. This name will be recognized by Linux as a device name that you will have to mount.

3- In Linux, open a Terminal and create a new directory where you would like to put your shared folder content. It's important to create a specific folder for your shared folder.

4- Then type in the following command:

mount -t vboxsf devicename mountpoint

devicename is the name you specified earlier.

mountpoint is the path to the folder you have just created.

mount is a root command. As Unix system only have one root file system, this command allows you to attach the file system found in a device to the root file system.

My mistake was to put as the mountpoint an existing folder. The consequence was that Linux will attach the new file system to that mountpoint and hide all the other elements that already existed in that mountpoint.To cancel mount command, you can use:

sudo umount devicename

Now you should be good to go.

Saturday, October 11, 2008

Tutorial to setup Ubuntu 8.04 Hardy Heron in Virtual Box

The goal of this tutorial is to setup Ubuntu 8.04 in Virtual Box 2.02 on a Acer 6920. You can download the last version of Ubuntu from here. You can choose either a desktop edition or a server edition. Once downloaded, you can choose to keep the ISO file on your hard drive or burn it. This tutorial is based on the first option.

1. Set up the Operating System

Select your Ubuntu Virtual Machine and click launch to start it. A new Wizard will help you install your operating system.
Click Next.

The media type is obviously a CD/DVD-ROM. Floppy disks are used to setup old operating systems such as MS-DOS which are still supported by Virtual Box. Because our Ubuntu installation files are store in a ISO file in our physical hard drive, the media source will be an image file for which we will need to indicate the path. Click Image File and click on the browse button. The following window opens:


Click the Add button and browse to the location of your ISO image of Ubuntu. The Virtual Machine will boot using the image file as a virtual CD/DVD-ROM.


An information window will tell you how to make the mouse pointer captured by the guest window or released to be used by the host operating system.The first option shows the desktop environment of Ubuntu. Use the second one to install Ubuntu in your new virtual machine. A new Wizard will start to help you configuring your locale configuration. The first window will ask you to choose the language.
The next screen will ask you your geographic location or the nearest place.

The next screen allows you to choose you keyboard layout.
The next screen allows you to prepare for your disk partition. We will use the Guided - Use entire disk for the purpose of this tutorial. The next screen will ask you about your personal identification information. The last screen gives you a summary of your new operating system setup before installing Ubuntu on your virtual hard drive.

Once the installation done, you are prompted to restart your virtual machine.

2- Setup the VBoxGuestAdditions
You can see that Ubuntu automatically retrieves the guest network connection.
The next step is to unload the image file of the Ubuntu installation CD and replace it with the VBoxGuestAdditions.iso file that comes with the Virtual Box. This image file contains an application designed to provide closer integration between host and guest, improving the interactive performance of guest systems. To do that, you can shut down the Virtual Machine, click the Preferences button, and click CD/DVD-ROM in the left menu.

Make sure to have the Insert CD/DVD-ROM check box selected with the ISO image file radio button. In the drop down list, select the VBoxGuestAdditions.iso file. Once you start again your your virtual machine, you will see the image file on your desktop like in the screenshot below.
Launch the terminal from the Application menu and Accessories. To reach the CD-ROM, type:

cd /cdrom

Then run the Linux shellscript, using administrator privilege:

sudo sh ./VirtualBoxLinuxAdditions-x86.run

The script will run after prompting the administrator password. Shut down your virtual machine to apply the changes and proceed to the next step.

3- Configuring the sound

From the Preferences, click Audio. Select Activate Audio check box. From the Host Audio Driver, choose Windows Direct Sound; for the Audio Controller, choose ICH AC97.






Wednesday, October 8, 2008

Create a Virtual Machine for Ubuntu Tutorial with Virtual Box

Virtual Box is another Sun's amazing open-source product that basically creates a virtual computer within you real operating system. The product exists for either Linux or Windows platform and can be used to set up any major Linux distribution and Windows for desktop or server purpose. The greatest advantage of virtualization is hardware ressource saving for organisations. But for individual user, it offers the advantages of using 2 operating systems in the same computer without the need to format and partition your hard drive and all the other small configuration issues of dual booting without the need to format your main hard drive. You also have the possibility to install several instances of an operating system, or different operating systems which can be tricky (or even impossible?) in multi booting.
My goal in this tutorial is to show how to set up Linux Ubuntu 8.04 under Windows Vista Home Premium Edition.
1 - Setup Virtual Box
This process is straightforward and does not deserve to be detailed here. The installation file can be downloaded here.
2 - Create a new Virtual Machine
Click New (Nouveau) to launch the New Virtual Machine Wizard.

Give a name to your new VM (as you give a name to your computer when setting up Windows).





The drop-down list box shows all the supported operating systems. The following window asks you to give a size to your memory.

You need to consider though that the amount of memory you give to your Virtual Machine will not be available to your host operating system anymore. On the other hand, you should give to your Operating System enough memory for it to work properly, Windows Vista as a guest for example, will require 512 Mb of memory at least.
The next step asks you to a new boot disk, with a recommanded minimum size of 8192 Mo. Click New.


Another wizard will help you to create a new virtual disk. The next window will ask you to choose between creating dynamic size virtual disk or a fixed size virtual disk. The dynamic size has a minimum size of 2 Gb and grows as it is filled with data. This option is recommanded if you want to save space on your physical hard drive.








You give a name to your virtual hard drive and use a slider to assign a minimum size. Then, you specify the path you want your image file being saved in. Virtual Machine will start to create the image file. I use 20 Gb for the size of the virtual hard drive.



You can create as many virtual disk as you like. But like memory, the disk space you use to create a virtual disk will not be available to your host operating system anymore. The next window appears when Virtual Box has done created a virtual hard drive.













From there, you can create other hard drive by clicking new, or clicking Existing to select other available virtual hard drives to be used as a primary master. The last window is a summary of your virtual machine instance configuration. You can later change the size of your memory and many other parameters.









Saturday, January 5, 2008

Accessing MySQL server using JDBC (Java DataBase Connectivity) from Open Office Org 2.2

First trial:
As I've done with other IDE like Eclipse or NetBeans, it was obvious for me to download from MySQL website the last release of the Java based driver compatible with my MySQL server version and then follow the steps for connecting my database server to Open Office, but once the connection test succesfully ran and actually established, Open Office crashed when I tried to browse the content of a table with not even a hint to indicate the source of the problem.
Second trial:
I was recommanded to use the following command:
apt-cache search jdbc | grep java


This command got me the name of the library that contains the JDBC driver for MySQL with several other « maybe » useful libraries. The next step was to install this library using:
sudo apt-install libmysql-java
Then restart your session.
Start Open Office Database.
Select Connect to an existing database and choose MySQL, click Next.


Choose Connecting using JDBC, click Next.


Fill the textfields, the database name should be one that already exist in your server, the server URL I used was localhost, and the port is 3306 (it's the default port assigned for MySQL server at installation, but it can be different ...). By default the Java class file used has already been specified, click Test Class.



The following window confirms that the driver has been successfully loaded.



This window asks for your authentification (username then password) and allows you to test the connection.