Reader small image

You're reading from  Pentaho 5.0 Reporting by Example: Beginner's Guide

Product typeBook
Published inAug 2013
PublisherPackt
ISBN-139781782162247
Edition1st Edition
Tools
Right arrow
Author (1)
Right arrow

Chapter 2. Installation and Configuration

In this chapter we will look at the system requirements to be able to correctly execute the Pentaho Report Designer (PRD), and we will explain how to meet these requirements step-by-step.

We will download PRD 5.0 from SourceForge.net and explain how different versions of PRD are organized on the download site.

Once we have downloaded PRD, we will install it in our operating system. We will also explain how to configure the drivers that will be used and how to assign more RAM to the PRD execution environment.

Throughout this book we use the MySQL example database Sakila DB for creating different reports. We will explain what Sakila DB is and how to download and install it using the MySQL command-line processor (CLP).

We will show the tables of Sakila DB and their relations using entity relationship diagrams (ERD).

In this chapter we will learn how to:

  • Install the JDK

  • Set the JAVA_HOME and PATH variables

  • Download and install Pentaho Report Designer...

Configuring the environment


The system requirements needed to run PRD are installing JDK and configuring the environment variables.

System requirements

To correctly execute PRD, the following are necessary:

  • The Java Runtime Environment (JRE) 1.7 or higher installed

  • The JAVA_HOME variable configured

  • The PATH variable entry configured, pointing to [JAVA_HOME]/bin

While only JRE is necessary to execute PRD and the other applications that we will discuss in this book, we will also need the Java Development Kit (JDK) to develop one of the applications in the last chapters. For this reason, we will install JDK 1.7.

Note

JDK also includes the Java Virtual Machine (JVM), a series of tools that lets us develop Java applications, including a compiler, a debugger, the API source code, the JRE, and so on.

Time for action – installing JDK and configuring the environment variables


To configure the JAVA_HOME and PATH variables, follow these steps:

Installing on a LINUX environment:

  1. Install JDK 1.7. You can go to the official Java website (www.java.com), download the installer file and then execute it in your operating system. Or you can execute the following commands in a terminal:

    shell> sudo add-apt-repository ppa:webupd8team/java
    shell> sudo apt-get update
    shell> sudo apt-get install oracle-java7-installer
  2. Write the following command in the terminal:

    shell> sudo gedit /etc/environment
  3. Add a line in this file that contains the following (or similar, depending on each environment):

    JAVA_HOME="/usr/lib/jvm/java-7-oracle"
  4. To the beginning of the value of the PATH variable, add the /usr/lib/jvm/java-7-oracle/bin: string.

    Note

    The separator for the PATH entries in Linux environments is ":".

  5. The /etc/environment file should look like this:

  6. Restart the session.

In Windows environments:

  1. Install JDK...

Time for action – downloading, installing, and configuring PRD


We will download PRD from the SourceForge.net repositories, install PRD, and set your RAM:

  1. To download PRD, paste http://sourceforge.net/projects/pentaho/files/Report%20Designer/ in your web browser.

    Different versions of PRD are stored here, each version in its own folder.

    In the latest versions, we can recognize the type of content of the packages according to the following pattern:

    • prd-source-[version].zip: This contains the PRD source code

    • prd-ce-[version].zip: This contains the Windows distribution

    • prd-ce-mac-[version].tar.gz: This contains the Mac distribution

    • prd-ce-[version].tar.gz: This contains the Linux distribution

    In our case, we download Version 5.0.0; therefore, in Linux environments, we should download the following file:

    • prd-ce-5.0.0.stable.tar.gz

    And in Windows environments, we should download the following file:

    • prd-ce-5.0.0.stable.zip

  2. Now we will install PRD.

    We choose a folder and unzip the file according to our...

Learning the Sakila database


Sakila DB is an example database developed by Mike Hillyer, who is a member of the MySQL AB documentation team. The goal of Sakila DB is to be the example database used in books, articles, tutorials, examples, and so on. Sakila's development dates back to 2005. Since then, it has grown and become stronger through various community contributions.

Sakila DB is designed to store information for a video rental store: actors, movies, clients, rentals, payments, and so on.

Sakila is the name of the dolphin used in the official MySQL logo:

Note

About MySQL in this book

In this book, we assume that the reader has MySQL Server 5 or later installed. The installation and configuration of MySQL Server is beyond the scope of this book. There are many good tutorials on how to install MySQL in different operating systems, for example, http://dev.mysql.com/doc/workbench/en/wb-starting.html.

Time for action – downloading and installing Sakila DB


Sakila DB can be downloaded from http://dev.mysql.com/doc/index-other.html.

After browsing to that URL, follow these steps to download and install Sakila:

  1. In the Example Databases section, you will find the links to download Sakila DB, as shown in the following screenshot.

  2. Once the correct file has been downloaded, we will unzip it in a temporary folder that we will call [SAKILA_TMP].

  3. Then, we will execute two commands in a terminal to create the database and populate it with data.

  4. First, we will execute the sakila-schema.sql script to create the general schema of the Sakila database, that is, the tables, views, and so on. After executing the following command, we will be asked for the root user password. This is determined by the following command:

    p.shell...

Summary


After finishing this chapter, we should be able to correctly configure the PRD work environment. We have installed JDK and configured the JAVA_HOME and PATH environment variables.

We have downloaded PRD 5.0 from SourceForge.net in accordance with our operating system, and learned about the pattern of names for various packages. For example, the prd-ce-[version].tar.gz package corresponds to the Linux-type operating systems and the prd-ce-[version].zip package corresponds to Windows operating systems.

Next, we installed PRD, unzipping the respective package, and explained that the path where we should place the JDBC drives is [PRD_HOME]/lib/jdbc. We also edited the [PRD_HOME]/report-designer.[sh|bat] file in order to explain how to assign RAM to the PRD execution environment.

We explained that the reports in this book are based on the example database, Sakila DB. This database stores information about a video rental store: movies, rentals, payments, and so on.

We also explained how to...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Pentaho 5.0 Reporting by Example: Beginner's Guide
Published in: Aug 2013Publisher: PacktISBN-13: 9781782162247
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime