Pentaho Installation Wizard or manual installation: Starting on boot
The installation wizard and manual installation do not provide a way to start the Pentaho Repository and Pentaho Server automatically on boot. They also do not stop automatically at shutdown. Here are examples of how you might approach creating a script to start at boot and stop at shutdown.
This procedure assumes that you are running the Pentaho Server under the
pentaholocal user account. If you are using a different account to start these services, substitute it in the script in step 2.This script also assumes you are using the PostgreSQL repository. Where
postgresqlappears in this script, change it to reflect the RDBMS you are using as a repository, either MySQL or Oracle.This script was tested on Red Hat Enterprise Linux. You may have to modify the details of the script if you use a different distribution of Linux or other Unix-like operating system, different shells, or different init systems.
With root permissions, create a file in
/etc/init.d/namedpentahoor namedpdi, depending on your needs.Using a text editor, copy the following content into the new pentaho script. If running the solution repository on the same machine as the server, change
postgresqlto the name of theinitscript for your database.If running the solution repository on the a remote computer, remove
postgresqlentirely. You may also have to adjust the paths to the Pentaho Server scripts to match your situation.#!/bin/sh ### BEGIN INIT INFO # Provides: start-pentaho stop-pentaho # Required-Start: networking postgresql # Required-Stop: postgresql # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Pentaho Server ### END INIT INFO case "$1" in "start") su - pentaho -c "/home/pentaho/pentaho/server/pentaho-server/start-pentaho.sh" ;; "stop") su - pentaho -c "/home/pentaho/pentaho/server/pentaho-server/stop-pentaho.sh" ;; *) echo "Usage: $0 { start | stop }" ;; esac exit 0Save the file and close the text editor.
Open
/home/pentaho/pentaho/server/pentaho-server/start-pentaho.sh.Change the last
ifstatement to match the this example:if [ "$?" = 0 ]; then cd "$DIR/tomcat/bin" export CATALINA_OPTS="-Xms4096m -Xmx6144m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" env JAVA_HOME=$_PENTAHO_JAVA_HOME sh ./startup.sh fiSave the file and close the text editor.
Make the init script executable.
chmod +x /etc/init.d/pentahoAdd the
Pentahoinitscript to the standard run levels by using theupdate-rc.dcommand, so that it runs when the system starts, and stops when the system is shut down or rebooted.This command may not exist on your computer if it is not Debian-based. If that is the case, consult your distribution documentation or contact your distribution's support department to determine how to add init scripts to the default run levels.
update-rc.d pentaho defaults
Last updated
Was this helpful?

