Skip to main content
Pentaho Documentation

Manage Licenses with the CLI

Overview

Although the Administration page of the User Console is the quickest, easiest, and most comprehensive way to manage the BA Server, you may be in environments where it is difficult or impossible to deploy or use the console. See the alternative instructions for command line interface (CLI) license registration for step-by-step instructions.

Although the Administration page of the User Console is the quickest, easiest, and most comprehensive way to manage the BA Server, you may be in environments where it is difficult or impossible to deploy or use the console. See the alternative instructions for command line interface (CLI) license registration for step-by-step instructions.

To ensure that the BA Server and DI Server use the same location to store and retrieve Pentaho licenses, you must create a PENTAHO_INSTALLED_LICENSE_PATH system variable for your pentaho user account. If you do not set this variable, the User Console and the command line license installation script will store license data in a place that the DI Server and BA Server will not look.

It does not matter what you set this location to; however, it needs to be available to the user account(s) that run the User Console and the BA and DI Server.

Set the License Path Variable on Linux

  1. Edit your /etc/environment file with a text editor. If you're using Solaris, you will have to set this environment variable through whatever means are available to you.
  2. Add this line in a convenient place (changing the path as explained above, if necessary): export PENTAHO_INSTALLED_LICENSE_PATH=/home/pentaho/.installedLicenses.xml.
  3. You must log out and log back into the operating system for the change to take effect.
  4. Verify that the variable is properly set.
    env | grep PENTAHO_INSTALLED_LICENSE_PATH
The PENTAHO_INSTALLED_LICENSE_PATH variable is now set.

Set the License Path Variable on Windows

  1. In Windows 2008 Server, right-click on Computer, then select Properties from context menu, then click Advanced System Settings. The System Properties window will come up.
  2. In the System Properties window, click the Advanced tab, then click Environment Variables.
  3. In the System Variable section, click New.
  4. A popup dialog will ask for a variable name and value. Type PENTAHO_INSTALLED_LICENSE_PATH into the name field, and the directory you intend to install licenses to plus .installedLicenses.xml in the value field, then click OK.
    C:/pentaho/.installedLicenses.xml
  5. In the parent window, click Apply Changes.
  6. You must restart your computer for the change to take effect.
  7. Verify that the variable is properly set.
    echo %PENTAHO_INSTALLED_LICENSE_PATH%
The PENTAHO_INSTALLED_LICENSE_PATH variable is now set.
If you run Tomcat automatically as a Windows service, you must also configure it to run on the Windows user account where the .installedLicenses.xml file is located.

Install or Update License Keys from the Command Line

  1. Download the .lic file you want to install.
  2. Navigate to the /license-installer/ directory.
  3. Copy your .lic files to the /license-installer/ directory.
  4. Run the license installation script.
    1. Linux: Run install_license.sh with the install switch and the location and name of your .lic file as a parameter. You can specify multiple .lic files separated by spaces. Be sure to use backslashes to escape any spaces in the path or file name.
      
       ./install_license.sh install Pentaho\ BI\ Platform\ Enterprise\ Edition.lic 
    2. Windows: Run install_license.bat with the install switch and the location and name of your license file as a parameter.
      
      install_license.bat install "C:/Users/dvader/Downloads/Pentaho BA Platform Enterprise Edition.lic"

List or Remove License Keys from the Command Line

To list or remove Pentaho keys in the command line interface, follow the below instructions.

  1. Navigate to the /pentaho/server/license-installer/ directory.
  2. Run the install_license.bat (on Windows) or ./install_license.sh (on Linux) script with the display switch.
    
    Windows: install_license.bat display
    
    Linux: ./install_license.sh display
    If you have installed any Enterprise Edition keys, a list of them will appear, along with the products they cover and the duration of the license.
  3. To remove a license, run the same script with the uninstall switch.
    
    Windows: install_license.bat uninstall
    
    Linux: ./install_license.sh uninstall
    A list of installed licenses will appear, followed by a prompt for the license ID you would like to remove. If you press Enter at this prompt, it will exit without taking any action.
  4. Type in the license ID number that you want to remove, then press Enter.

    After removing a key, if you had more than one installed, the list will regenerate and the prompt will reappear. You can choose to remove another license key, or you can press Enter to exit the script.

    If you would prefer not to be prompted for confirmation, or if you intend to call this program as part of a script, use the -q switch to suppress prompting.