To set environment variable temporary, you need to open terminal and execute in the command line:
export PENTAHO_JAVA_HOME=/some/path/where/java/located
If you need it persistent, you can add above line at the end of your shell configuration file. Usually, shell config file is named: ~/.profile, ~/.bashrc
So, look for any of files above. If no files, create ~/.profile file:
touch ~/.profile
and place the command line above into it (using any text editor you prefer most).
Re-login/re-boot might be necessary.
To check if you have the variabled successfully set, you can execure such command in the terminal:
echo $PENTAHO_JAVA_HOME
It will show value of the variable.