We will install Pentaho BI Suite on an Ubuntu 14.04 Server with PostgreSQL 9.3 server as a backend for Pentaho. We have chosen PostgreSQL server because this is the main database server used with ODOO. So if you are planning to take a look at Pentaho to do some Analysis of ODOO data. Check this How To and start using Pentaho.
1. Update the server to the latest version of Ubuntu 14.04
sudo apt-get update sudo apt-get upgrade -y sudo apt-get install unzip -y
2. Install PostgreSQL Server
We will just install the PostgreSQL server wich comes with Ubuntu 14.04.
sudo apt-get install postgresql -y
The postgreSQL server needs changed priviliges to work with Pentaho. The pg_hba.inf needs to be changed to use MD5 for local connections. If you are testing you can also use trust.
sudo vi /etc/postgresql/9.3/main/pg_hba.inf
Find the line wich starts with local and ends with peer. Change peer in MD5 or trust (for development environments).
3. Prepare the java environment
Install the correct java jdk
sudo apt-get install openjdk-6-jdk -y
If there are more java environments on the server choose the correct default (openjdk-6-jdk)
sudo update-alternatives --config java
Set up JAVA_HOME environment
sudo su root -c "echo 'export JAVA_HOME=\"/usr/lib/jvm/java-6-openjdk-amd64\"' >> /etc/environment"
4. Install Pentaho BI Suite 5.1 CE
Download the Pentaho BI Suite 5.1 CE
wget http://downloads.sourceforge.net/project/pentaho/Business%20Intelligence%20Server/5.1/biserver-ce-5.1.0.0-752.zip
Unpack the zip file to the application folder
sudo unzip biserver-ce-5.1.0.0-752.zip -d /opt/pentaho
Run the pentaho -postgresql scripts and if asked give the default password: password for the hibuser and pentaho_user. If you want to use a different password please adjust them in the sql files.
sudo -u postgres psql -a -f /opt/pentaho/biserver-ce/data/postgresql/create_quartz_postgresql.sql
sudo -u postgres psql -a -f /opt/pentaho/biserver-ce/data/postgresql/create_repository_postgresql.sql
sudo -u postgres psql -a -f /opt/pentaho/biserver-ce/data/postgresql/create_jcr_postgresql.sql
Download the PostgreSQL JDBC driver in the /usr/share/java folder
cd /usr/share/java
wget jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc4.jar
Make a symbolic link for naming
ln -s postgresql-9.3-1102.jdbc4.jar postgresql-9.3-jdbc4.jar
Make a symbolic link in the /opt/pentaho/biserver-ce/tomcat/lib folder
cd /opt/pentaho/biserver-ce/tomcat/lib
ln -s /usr/share/java/postgresql-9.3-jdbc4.jar postgresql-9.3-jdbc4.jar
4. Change Pentaho settings for using PostgreSQL database for backend
Change the pentaho tomcat context.xml file (/opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml)
sudo sed -i s/"org.hsqldb.jdbcDriver"/"org.postgresql.Driver"/g /opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
sudo sed -i s/"jdbc:hsqldb:hsql:\/\/localhost\/hibernate"/"jdbc:postgresql:\/\/localhost:5432\/hibernate"/g /opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
sudo sed -i s/"select count(\*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES"/"select 1"/g /opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
sudo sed -i s/"org.hsqldb.jdbcDriver"/"org.postgresql.Driver"/g /opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
sudo sed -i s/"jdbc:hsqldb:hsql:\/\/localhost\/quartz"/"jdbc:postgresql:\/\/localhost:5432\/quartz"/g /opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
sudo sed -i s/"select count(\*) from INFORMATION_SCHEMA.SYSTEM_SEQUENCES"/"select 1"/g /opt/pentaho/biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
Change the hibernate config files (/opt/pentaho/biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties)
sudo sed -i s/"org.hsqldb.jdbcDriver"/"org.postgresql.Driver"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties
sudo sed -i s/"jdbc:hsqldb:hsql:\/\/localhost\/hibernate"/"jdbc:postgresql:\/\/localhost:5432\/hibernate"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties
Change the hibernate config files (/opt/pentaho/biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml)
sudo sed -i s/"system\/hibernate\/hsql.hibernate.cfg.xml"/"system\/hibernate\/postgresql.hibernate.cfg.xml"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml
Change the hibernate config files (/opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties)
sudo sed -i s/"SampleData\/type=javax.sql.DataSource"/"#SampleData\/type=javax.sql.DataSource"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleData\/driver=org.hsqldb.jdbcDriver"/"#SampleData\/driver=org.hsqldb.jdbcDriver"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleData\/url=jdbc:hsqldb:hsql:\/\/localhost\/sampledata"/"#SampleData\/url=jdbc:hsqldb:hsql:\/\/localhost\/sampledata"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleData\/user=pentaho_user"/"#SampleData\/user=pentaho_user"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleData\/password=password"/"#SampleData\/password=password"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Hibernate\/driver=org.hsqldb.jdbcDriver"/"Hibernate\/driver=org.postgresql.Driver"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Hibernate\/url=jdbc:hsqldb:hsql:\/\/localhost\/hibernate"/"Hibernate\/url=jdbc:postgresql:\/\/localhost:5432\/hibernate"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Quartz\/driver=org.hsqldb.jdbcDriver"/"Quartz\/driver=org.postgresql.Driver"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Quartz\/url=jdbc:hsqldb:hsql:\/\/localhost\/quartz"/"Quartz\/url=jdbc:postgresql:\/\/localhost:5432\/quartz"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Shark\/type=javax.sql.DataSource"/"#Shark\/type=javax.sql.DataSource"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Shark\/driver=org.hsqldb.jdbcDriver"/"#Shark\/driver=org.hsqldb.jdbcDriver"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Shark\/url=jdbc:hsqldb:hsql:\/\/localhost\/shark"/"#Shark\/url=jdbc:hsqldb:hsql:\/\/localhost\/shark"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Shark\/user=sa"/"#Shark\/user=sa"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"Shark\/password="/"#Shark\/password="/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleDataAdmin\/type=javax.sql.DataSource"/"#SampleDataAdmin\/type=javax.sql.DataSource"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleDataAdmin\/driver=org.hsqldb.jdbcDriver"/"#SampleDataAdmin\/driver=org.hsqldb.jdbcDriver"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleDataAdmin\/url=jdbc:hsqldb:hsql:\/\/localhost\/sampledata"/"#SampleDataAdmin\/url=jdbc:hsqldb:hsql:\/\/localhost\/sampledata"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleDataAdmin\/user=pentaho_admin"/"#SampleDataAdmin\/user=pentaho_admin"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
sudo sed -i s/"SampleDataAdmin\/password=password"/"#SampleDataAdmin\/password=password"/g /opt/pentaho/biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
5. Start your Pentaho BI Server
Make the .sh files executable
sudo chmod +x /opt/pentaho/biserver-ce/*.sh
Make the .sh files executable
cd /opt/pentaho/biserver-ce
./start-pentaho.sh
Go to
http://ipaddress-pentaho-server:8080
pg_hba.inf > The pg_hba.conf !!!!
First time to setup Pentaho on an Ubuntu 14.04 with odoo 8 and postgres 9.3. All aove seems to go well till I reach this:
franz@nabi-odoo:~$ sudo -u postgres psql -a -f /opt/pentaho/biserver-ce/data/postgresql/create_quartz_postgresql.sql
Error results in this:
–Begin–
— note: this script assumes pg_hba.conf is configured correctly
—
— \connect postgres password
drop database if exists quartz;
DROP DATABASE
drop user if exists pentaho_user;
DROP ROLE
CREATE USER pentaho_user PASSWORD ‘password’;
CREATE ROLE
CREATE DATABASE quartz WITH OWNER = pentaho_user ENCODING = ‘UTF8’ TABLESPACE = pg_default;
CREATE DATABASE
GRANT ALL ON DATABASE quartz to pentaho_user;
GRANT
–End–
–Begin Connect–
\connect quartz pentaho_user
psql:/opt/pentaho/biserver-ce/data/postgresql/create_quartz_postgresql.sql:18: \connect: FATAL: Peer authentication failed for user “pentaho_user”
But after this everything goes on as normal. Starting Pentaho server shows this:
franz@nabi-odoo:/opt/pentaho/biserver-ce$ sudo ./start-pentaho.sh
[sudo] password for franz:
WARNING: Using java from path
DEBUG: _PENTAHO_JAVA_HOME=
DEBUG: _PENTAHO_JAVA=java
Using CATALINA_BASE: /opt/pentaho/biserver-ce/tomcat
Using CATALINA_HOME: /opt/pentaho/biserver-ce/tomcat
Using CATALINA_TMPDIR: /opt/pentaho/biserver-ce/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/pentaho/biserver-ce/tomcat/bin/bootstrap.jar
But accessing Pentaho site shows site cant be reached. Thanks for any help on how to proceed.
Hello, first time to install Pentaho. I get this error when executing this line:
sudo -u postgres psql -a -f /opt/pentaho/biserver-ce/data/postgresql/create_quartz_postgresql.sql
error is:
–Begin–
— note: this script assumes pg_hba.conf is configured correctly
—
— \connect postgres password
drop database if exists quartz;
DROP DATABASE
drop user if exists pentaho_user;
DROP ROLE
CREATE USER pentaho_user PASSWORD ‘password’;
CREATE ROLE
CREATE DATABASE quartz WITH OWNER = pentaho_user ENCODING = ‘UTF8’ TABLESPACE = pg_default;
CREATE DATABASE
GRANT ALL ON DATABASE quartz to pentaho_user;
GRANT
–End–
–Begin Connect–
\connect quartz pentaho_user
psql:/opt/pentaho/biserver-ce/data/postgresql/create_quartz_postgresql.sql:18: \connect: FATAL: Peer authentication failed for user “pentaho_user”
Not sure if this affects cause when I start pentaho this is what shows on screen
franz@nabi-odoo:/opt/pentaho/biserver-ce$ sudo ./start-pentaho.sh [sudo] password for franz:
WARNING: Using java from path
DEBUG: _PENTAHO_JAVA_HOME=
DEBUG: _PENTAHO_JAVA=java
Using CATALINA_BASE: /opt/pentaho/biserver-ce/tomcat
Using CATALINA_HOME: /opt/pentaho/biserver-ce/tomcat
Using CATALINA_TMPDIR: /opt/pentaho/biserver-ce/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/pentaho/biserver-ce/tomcat/bin/bootstrap.jar
But when I access site it just shows site cannot be reached. Appreciate if you can let me know what am doing wrong. Tks
Andre, thanks for the great step-by-step guide.
FYI : (for some users following the above guide)
When installing pentaho bi-server-ce-6.1 with postgres database for linux-ubuntu, the user might come across the error:
ERROR_0014 – Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
The solution:
Please log into your postgres instance, connect to quartz db, change schema to public and then issue the following commands:
****************************************************************************************
CREATE TABLE “QRTZ”
(
NAME VARCHAR(200) NOT NULL,
PRIMARY KEY (NAME)
);
****************************************************************************************
Then please restart the tomcat server.
$ sudo ./start-pentaho.sh
This might solve the above error related to initialization process where the method code checks for the presence of quartz related tables in quartz db.
For more information check url:
http://forums.pentaho.com/showthread.php?153231-Pentaho-ce-5-Initialization-Exception
[…] The SED commands that I came to love: http://www.schenkels.nl/2014/08/how-to-install-and-configure-pentaho-bi-suite-5-1-ce-ubuntu-14-04-po… […]
Thanks, you did a fantastic work. I tried a fresh install following your guide, and it works perfectly. My install, sadly, refuse only to do one small function: It does not schedule. Can you please control if you have the same failure? Thanks again
Giuseppe Stancanelli
Italy
Hello, thanks for the nice tutorial. When I start the server i get the following error:
The following errors were detected
One or more system listeners failed. These are set in the systemListeners.xml.
org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 – Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
Again get error:
Pentaho Initialization Exception
The following errors were detected
One or more system listeners failed. These are set in the systemListeners.xml.
org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 – Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
Please see the server console for more details on each error detected.
==> tomcat/logs/pentaho.log <==
2015-05-29 09:45:02,344 ERROR [org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener] EmbeddedQuartzSystemListener.ERROR_0007_SQLERROR
org.postgresql.util.PSQLException: ERROR: syntax error at or near "RUNSCRIPT"
Position: 1
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:333)
at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
at org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener.verifyQuartzIsConfigured(EmbeddedQuartzSystemListener.java:176)
at org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener.startup(EmbeddedQuartzSystemListener.java:100)
at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:398)
at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:389)
at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:368)
at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:389)
at org.pentaho.platform.engine.core.system.PentahoSystem.access$000(PentahoSystem.java:77)
at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:326)
at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:323)
at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:368)
at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:323)
at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:294)
at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:207)
at org.pentaho.platform.web.http.context.SolutionContextListener.contextInitialized(SolutionContextListener.java:135)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2015-05-29 09:45:02,348 ERROR [org.pentaho.platform.util.logging.Logger] Error: Pentaho
Hi Andre, on the end of install I get:/opt/pentaho/biserver-ce/promptuser.sh: 17: /opt/pentaho/biserver-ce/promptuser.sh: cannot create promptuser.sh: Permission denied
Just add a “sudo” in front to make that work 😉