How to manually install Pentaho BI server (Linux)

This post is outdated, here you can find the 3.5 version

The goal is a working Pentaho BI server environment which include:

  • Tomcat6
  • MySQL 5.0
  • Pentaho BI server 1.7.1
  • Ubuntu 8.10

First we have to make sure we have a working JVM:

java -version

output:

java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6) Runtime Environment (build 1.6.0_0-b12)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b12, mixed mode)

If you don’t have java you can install it directly:

apt-get install openjdk-6-jre openjdk-6-jdk

or as a dependency of Tomcat:

apt-get install tomcat6 tomcat6-user tomcat6-examples tomcat6-admin tomcat6-docs

After installing verify the installation on http://localhost:8080

The port on which tomcat is running can be adjusted:

1. stop tomcat
2. edit the configuration file
sudo /etc/init.d/tomcat6 stop
sudo nano /var/lib/tomcat6/conf/server.xml

search for <Connector port=”8080″ and make it whatever you want….

we must also change the tomcat users to manage Tomcat:

sudo nano /var/lib/tomcat6/conf/tomcat-users.xml

and add this line before </tomcat-users> and fill the dots:

<user username="...." password="o..." roles="admin,manager"/>

start tomcat with

sudo /etc/init.d/tomcat6 start

Test the user settings here by starting Tomcat manager: http://localhost:8080/manager/html

The next thing we have to do is to setup the MySQL databases needed by Pentaho. First we have to downloaded the pentaho file with the data. All Pentaho files can be found on SourceForge. Click on Business Intelligence Server and then click on 1.7.1-GA. Download  pentaho_demo_mysql5-1.7.1.tar.gz and save on it somewhere (Desktop). Unpack it and search for /data/SampleDataDump_MySql.sql and go this location in a console.

Load the sql file by:

mysql -u root  -p

source SampleDataDump_MySql.sql

….
….
Query OK, 0 rows affected, 1 warning (0.00 sec)

Check if import succeeded:

show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hibernate          |
| mysql              |
| quartz             |
| sampledata         |
+--------------------+
6 rows in set (0.00 sec)

Next thing to do is installing Pentaho BI server.

First download:

  1. pentaho_j2ee_deployments-1.7.1.zip
  2. pentaho_solutions-1.7.1.zip
  3. mysql-connector-java-5.1.6.tar.gz

Install MySQL connector

Go to the created directory and search for the file named  “mysql-connector-java-5.1.6-bin.jar” and copy this file to the tomcat lib directory:

sudo cp mysql-connector-java-5.1.6-bin.jar /usr/share/tomcat6/common/lib/

Deploy Pentaho J2EE packages

Go to the pentaho_j2ee_deployments directory and build the WAR files with the following commands :

ant zip-pentaho-style-war
ant zip-pentaho-steel-wheels-style-war
ant zip-pentaho-portal-layout-war
ant war-pentaho-tomcat-mysql

These commands should return “BUILD SUCCESSFUL” when succesful and created the following war files:

build/pentaho-wars/pentaho-portal-layout.war
build/pentaho-wars/pentaho-style.war
build/pentaho-wars/sw-style.war
build/pentaho-wars/tomcat/mysql5/pentaho.war

Copy this files to the tomcat directory:

sudo cp build/pentaho-wars/*.war /var/lib/tomcat6/webapps
sudo cp build/pentaho-wars/tomcat/mysql5/*.war /var/lib/tomcat6/webapps

When copied this files Tomcat will deploy these wars automatically and create the pentaho directories:

  • pentaho/
  • sw-style/
  • pentaho-portal-layout/
  • pentaho-style/

Next thing to do is to install the Pentaho solutions directory. We can use the /opt directory. Then we need to give the tomcat user read access to this directory:

sudo mkdir /opt/pentaho/pentaho-solutions
sudo chmod -R 775 /opt/pentaho/pentaho-solutions

Pentaho configuration

First we have to tell pentaho where it can find the solution directory by editing the web.xml file:

sudo nano /var/lib/tomcat6/webapps/pentaho/WEB-INF/web.xml

Search for the solution-path entry and make sure that it looks like this:

<context-param>
<param-name>solution-path</param-name>
<param-value>/opt/pentaho/pentaho-solutions</param-value>
</context-param>

Also make sure that this entry points to the port Tomcat is listening at:

sudo nano /var/lib/tomcat6/webapps/pentaho/WEB-INF/web.xml

<context-param>
<param-name>base-url</param-name>
<param-value>http://localhost:8080/pentaho/</param-value>
</context-param>

If you want to make Pentaho available in your network or from the internet, you must replace localhost by the computer hostname or local IP, for the internet use the IP address provided by your ISP.

Disable Tomcat security

For security reasons Tomcat forbids the execution of some jar files needed by Pentaho. It can be disabled by editing the Tomcat startup script and set security off:

sudo nano /etc/init.d/tomcat6

# Use the Java security manager? (yes/no)
TOMCAT6_SECURITY=no

Here you can read more about the Tomcat security manager

Pentaho data sources configuration

stop tomcat:

sudo /etc/init.d/tomcat6 stop

edit the tomcat server.xml file and add this lines before </host>:

sudo nano /etc/tomcat6/server.xml

<Context path="/pentaho" docbase="webapps/pentaho/">
<Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
<Resource name="jdbc/Hibernate" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="hibuser" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/hibernate" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/SampleData" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/Quartz" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/quartz" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/Shark" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/shark" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/SampleDataAdmin" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/solution1" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/solution2" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/solution3" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/solution4" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/solution5" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/datasource1" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/datasource2" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/datasource3" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/datasource4" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
<Resource name="jdbc/datasource5" auth="Container" type="javax.sql.DataSource" maxActive="20"
maxIdle="5" maxWait="10000" username="pentaho_user" password="password" validationQuery="Select 1"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/sampledata" testOnBorrow="true" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000"
maxEvictableIdleTimeMillis="60000"/>
</Context>

Also make sure the references and username/password to your database in /var/lib/tomcat6/webapps/pentaho/WEB-INF/classes/hibernate.cfg.xml are correct:

<!–  MySQL Configuration –>
<property name=”connection.driver_class”>com.mysql.jdbc.Driver</property>
<property name=”connection.url”>jdbc:mysql://localhost:3306/hibernate</property>
<property name=”dialect”>org.pentaho.repository.MySQL5InnoDBDialect</property>
<property name=”connection.username”>hibuser</property>
<property name=”connection.password”>password</property>

Now you can restart Tomcat and browse to your Pentaho installation:

sudo /etc/init.d/tomcat6 start

http://localhost:8080/pentaho

This post is outdated, here you can find the 3.5 version

Comments (4)

Mark NicholasNovember 26th, 2008 at 19:06

This HowTo “ALMOST” got me there, thank you! A couple little things I ran into and one I haven’t fixed yet

this:
>>sudo cp mysql-connector-java-5.1.6-bin.jar /usr/share/tomcat6/common/lib/

should read:
>>sudo cp mysql-connector-java-5.1.6-bin.jar /usr/share/tomcat6/lib/

And for those of us who are rather new to all this, this:
>>sudo mkdir /opt/pentaho/pentaho-solutions
>>sudo chmod -R 775 /opt/pentaho/pentaho-solutions

never mentions actually unzipping the pentaho_solutions INTO the directory

I also had to give the hibuser mysql user rights to localhost

With those in place I am able to login and do the “Hello World” example, I feel good.

The one gotchya I’m still working through is when I run the “Sample Data” in the Getting Started examples I end up with this error:

>> Error: java.io.FileNotFoundException: /opt/pentaho/pentaho-solutions/system/logs/audit/PentahoAuditLog.log (Permission denied) – org.pentaho.core.audit.AuditException: java.io.FileNotFoundException: /opt/pentaho/pentaho-solutions/system/logs/audit/PentahoAuditLog.log (Permission denied) (org.pentaho.core.solution.SolutionEngine)<<

one bite at a time I guess

AmolJanuary 9th, 2009 at 16:45

After all this follow this step

create tmp dir in system folder of pentaho-solutions and give r/w permissions to it

$ sudo mkdir /opt/pentaho/pentaho-solutions/system/tmp
$ sudo chmod 777 /opt/pentaho/pentaho-solutions/system/tmp

restart tomcat

Carlos ValdiviaAugust 16th, 2009 at 19:42

excelente manual, it’s just what i looking for, i wondered if exist the possibility to install manually bi server 3.0.1
Thanks a lot

[...] the last howto for Pentaho there has been a mayor change in the way Pentaho looks and some changes on the [...]

Leave a comment

Your comment