Configuring a Custom Java Home Location

Although not recommended, the Java Development Kit (JDK), which Cloudera services require, may be installed at a custom location if necessary. These steps assume you have already installed the JDK during product installation or as part of an upgrade.

To modify the Cloudera Manager configuration to ensure the JDK can be found:
  1. Log into the Cloudera Manager server host.
  2. Open the following file in a text editor:
    /etc/default/cloudera-scm-server
  3. Add the following line:
    export JAVA_HOME=path to the Java installation directory 
    For example:
    export JAVA_HOME=/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0
  4. Save the file.
  5. Restart the Cloudera Manager Server.
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl restart cloudera-scm-server
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-server restart
  6. Open the Cloudera Manager Admin Console.
  7. In the main navigation bar, click the Hosts tab. If you are configuring the JDK location on a specific host only, click the link for that host.
  8. Click the Configuration tab.
  9. Select Category > Advanced.
  10. Set the Java Home Directory property to the custom location.
  11. Click Save Changes.
  12. Restart all services.