Use PostgreSQL as your repository database (Manual installation)
Legacy page. Content moved to the main topic.
This page is kept for existing links. Go to Manual installation process.
Install PostgreSQL as the host database for the Pentaho Server repository.
Before you begin
Prerequisites
Prepare your environment first:
Repository components
The Pentaho Repository resides on the database you installed during environment setup.
It includes these components:
Jackrabbit Contains the solution repository, examples, security data, and report content data.
Quartz Stores scheduler data for reports and jobs.
Hibernate Stores audit logging data.
(Optional) Pentaho Operations Mart Stores system usage and performance data.
Initialize the PostgreSQL Pentaho Repository database
Run PostgreSQL initialization scripts to create the Pentaho Repository schemas.
You create schemas for Hibernate, Quartz, Jackrabbit (JCR), and Pentaho Operations Mart.
Use an ASCII database encoding when you run these scripts. Do not use UTF-8. UTF-8 can cause script failures due to text length limits.
Update usernames, passwords, and port numbers in examples and scripts to match your environment.
Quartz 1.x vs Quartz 2.x upgrade note (Pentaho 10.2.0.1+)
Pentaho 10.2.0.0 and earlier versions use Quartz 1.x tables with a QRTZ5_ prefix.
Pentaho 10.2.0.1 and later versions use Quartz 2.x tables with a QRTZ6_ prefix.
If you upgrade to Pentaho 10.2.0.1 or later, create the QRTZ6_ tables.
Optionally migrate your existing schedules using the provided migration script.
If you do not complete the Quartz upgrade, Pentaho Server can fail at startup.
You may see Missing Quartz library database error in catalina.log.
Step 1: Change default passwords
For production, follow best practices and change the default passwords in the SQL script files.
If you are evaluating Pentaho, you can skip this step.
Browse to
<your-pentaho-dir>/pentaho-server/data/postgresql.Edit these scripts for your user, password, database, and any other required values:
create_jcr_postgresql.sqlcreate_quartz_postgresql.sqlcreate_repository_postgresql.sqlpentaho_mart_postgresql.sql
Save the files.
Step 2: Run SQL scripts
Run the PostgreSQL initialization scripts from the Pentaho software distribution.
You may need administrator permissions to run these scripts on the host OS.
If you are upgrading from earlier Pentaho versions (including 10.2.0.0 GA → 10.2.0.1+), you must create the new Quartz 2.x tables.
If you want to keep existing scheduler data, migrate QRTZ5_ data to the new QRTZ6_ tables.
Back up your data. See Back up your existing Pentaho products and install Pentaho 11.0.
If Pentaho Server is running, stop it. See Stop and start the Pentaho Server and repository.
Make sure PostgreSQL is running.
Open a
psqlconsole and run these scripts in order:<your-pentaho-dir>/pentaho-server/data/postgresql/create_quartz_postgresql.sql<your-pentaho-dir>/pentaho-server/data/postgresql/create_jcr_postgresql.sql<your-pentaho-dir>/pentaho-server/data/postgresql/create_repository_postgresql.sql(Hibernate)<your-pentaho-dir>/pentaho-server/data/postgresql/pentaho_mart_postgresql.sql
This creates the Quartz database, Jackrabbit repository, PostgreSQL repository, and Operations Mart schema.
It also creates the new Quartz scheduler tables prefixed with
QRTZ6_.Any existing
QRTZ5_scheduler tables are retained.If you want to retain existing scheduler data, open
migrate_old_quartz_data_postgresql.sql.Update the migration script for your current user, password, database, and any other required values.
Run the migration script:
<your-pentaho-dir>/pentaho-server/data/postgresql/migrate_old_quartz_data_postgresql.sql
The original QRTZ5_ data is retained.
Delete it after you confirm the migration is successful.
If you do not have pentaho_mart_postgresql.sql, make sure you unpacked the Pentaho Operations Mart SQL file during installation.
For manual installs, see Prepare your Windows environment for a manual installation or Prepare your Linux environment for a manual installation.
Step 3: Verify PostgreSQL initialization
Unless you changed it in Step 1, the default password for the users below is password.
Open pgAdmin (or a similar client).
Log in as
hibuser, then verify you can see the tables underhibernate.If you installed Operations Mart, verify you can see the tables under
pentaho_operations_mart.Log in as
jcr_user, then verify you can see the tables underjackrabbit.The Jackrabbit tables may not appear until after you start Pentaho for the first time.
Log in as
pentaho_user, then verify you can see the tables underquartz.
You have initialized the PostgreSQL Pentaho Repository database.
Configure the PostgreSQL Pentaho Repository database
Configure Quartz, Hibernate, Jackrabbit, and Operations Mart for PostgreSQL.
PostgreSQL is configured by default. If you kept the default password and port, skip this section and continue to Perform Tomcat-specific connection tasks.
If you use a different port or password, update the examples to match your environment.
Set up Quartz on PostgreSQL
Quartz stores scheduler data, such as scheduled reports.
You point Pentaho at the correct JobStore by updating quartz.properties.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/scheduler-plugin/quartz/quartz.properties.In
#_replace_jobstore_properties, setorg.quartz.jobStore.driverDelegateClass:Save the file.
Set Hibernate settings for PostgreSQL
Hibernate settings point Pentaho to the correct Hibernate configuration file.
Hibernate also stores the audit logs used by Operations Mart.
Files are in pentaho/server/pentaho-server/pentaho-solutions/system/hibernate.
Open
hibernate-settings.xml.Find the
<config-file>entry, then confirm it uses the PostgreSQL config:Save the file if you made changes.
Modify Jackrabbit repository information for PostgreSQL
Update Jackrabbit to use the PostgreSQL repository.
Open
pentaho/server/pentaho-server/pentaho-solutions/system/jackrabbit/repository.xml.Comment out resource references for databases you are not using.
Verify these sections use the PostgreSQL values.
Repository
DataStore
Workspaces
PersistenceManager (workspaces)
Versioning
PersistenceManager (versioning)
DatabaseJournal
Perform Tomcat-specific connection tasks
After you configure the Pentaho Repository, configure Tomcat to connect to it.
This step sets up JDBC and JNDI connections for Hibernate, Jackrabbit, and Quartz.
Pentaho Server is configured for Tomcat by default. Only edit Tomcat context.xml if you changed default ports or passwords.
Download the JDBC driver and apply it to Pentaho Server
To connect to a database, you must install a JDBC driver JAR.
Install it for Pentaho Server and Tomcat.
Pentaho cannot redistribute some third-party database drivers. Download the driver from your database vendor.
Download a JDBC driver JAR from your database vendor.
Copy the JDBC driver JAR to
pentaho/server/pentaho-server/tomcat/lib.Optional: Copy
hsqldb-2.3.2.jartopentaho/server/pentaho-server/tomcat/lib.Do this if you want to keep the Pentaho sample data.
Modify JDBC connection information in the Tomcat context.xml file
context.xml fileDatabase connection settings are stored in Tomcat context.xml.
Update the file to match your environment.
If your port, password, username, driver class, or host differs from the defaults, update the examples.
Consult your database documentation for:
JDBC driver class name
JDBC connection string
Open
server/pentaho-server/tomcat/webapps/pentaho/META-INF/context.xmlin a text editor.Add the following XML if it does not already exist:
Update the username, password, driver class, host, and port to match your environment.
Comment out any resources for databases you are not using.
Verify
validationQuery="select 1".Save the file.
Next steps
Continue with Configure and start the Pentaho Server after manual installation.
Last updated
Was this helpful?

