For the silent installation process, the use of environment variables to specify server and system database credentials is supported. The use of environment variables allows you to perform a more secure silent installation, compared to a standard silent installation where credential information must be specified in plain text in the silent installation response file.

Supported environment variables

Environment variable Description
HDP_ADMIN_PASSWORD The password for the default d2cadmin or Hybrid Data Pipeline administrator account. Equivalent to the D2C_ADMIN_PASSWORD property in a GUI-generated response file, or the D2C_ADMIN_PASSWORD_CONSOLE property in a console-generated response file.
HDP_USER_PASSWORD The password for the default d2cuser or Hybrid Data Pipeline general user account. Equivalent to the D2C_USER_PASSWORD property in a GUI-generated response file, or the D2C_USER_PASSWORD_CONSOLE property in a console-generated response file.
HDP_DATABASE_ADMIN The ID or name of the system database administrator. Equivalent to the D2C_DB_ADMIN_USERNAME property in a GUI-generated response file, or the D2C_DB_ADMIN_USERNAME_CONSOLE property in a console-generated response file.
HDP_DATABASE_ADMIN_PASSWORD The password of the system database administrator. Equivalent to the D2C_DB_ADMIN_PASSWORD property in a GUI-generated response file, or the D2C_DB_ADMIN_PASSWORD_CONSOLE property in a console-generated response file.
HDP_DATABASE_USER The ID or name of a system database user. Equivalent to the D2C_DB_USER_USERNAME property in a GUI-generated response file, or the D2C_DB_USER_USERNAME_CONSOLE property in a console-generated response file.
HDP_DATABASE_USER_PASSWORD The password of a system database user. Equivalent to the D2C_DB_USER_PASSWORD property in a GUI-generated response file, or the D2C_DB_USER_PASSWORD_CONSOLE property in a console-generated response file.

Setting environment variables

Important: If you are using environment variables to specify sensitive values, unset them after the installation process for better security.

Environment variables must be set prior to installation in the same session that the server is being installed.

HDP_ADMIN_PASSWORD is being set in the following examples.

C shell example

setenv HDP_ADMIN_PASSWORD MyAdm1n*S3cr3t

Bourne or Korn shell example

export HDP_ADMIN_PASSWORD=MyAdm1n*S3cr3t

To verify that the HDP_ADMIN_PASSWORD environment variable has been set, execute the env command and review the output to confirm.

Environment variables and the response file

If using environment variables, the following rules apply when generating and editing the response file.

When generating the response file...

  • For the d2cadmin and d2cuser passwords, specify a dummy string to proceed with the installation.
    Note: You cannot change d2cadmin and d2cuser passwords during an upgrade installation.
  • For system database credentials, do not provide any values. Then, when prompted, skip database validation. Database validation is not required for a successful installation.

When editing a response file...

  • For the d2cadmin and d2cuser passwords, pass an empty string.
    Note: You cannot change d2cadmin and d2cuser passwords during an upgrade installation.
    GUI-generated response file example
    D2C_ADMIN_PASSWORD=
    D2C_USER_PASSWORD=
    Console-generated response file example
    D2C_ADMIN_PASSWORD_CONSOLE=\"\"
    D2C_USER_PASSWORD_CONSOLE=\"\"
  • For each system database credential, pass an empty string.
    GUI-generated response file example
    D2C_DB_ADMIN_USERNAME=
    D2C_DB_ADMIN_PASSWORD=
    D2C_DB_USER_USERNAME=
    D2C_DB_USER_PASSWORD=
    Console-generated response file example
    D2C_DB_ADMIN_USERNAME_CONSOLE=\"\"
    D2C_DB_ADMIN_PASSWORD_CONSOLE=\"\"
    D2C_DB_USER_USERNAME_CONSOLE=\"\"
    D2C_DB_USER_PASSWORD_CONSOLE=\"\"
  • The SKIP_DATABASE_VALIDATION property must be set to true.
  • The corresponding property of each environment variable must be present in the response file, even if passing an empty string. The following table shows how environment variables map to response file properties, depending on whether you generate the response file with the installer in GUI mode or console mode.
    Note: The dummy values or empty strings you specify in the response file are overwritten, at install time, by any environment variables you have set.
    Environment variable GUI property Console property
    HDP_ADMIN_PASSWORD D2C_ADMIN_PASSWORD D2C_ADMIN_PASSWORD_CONSOLE
    HDP_USER_PASSWORD D2C_USER_PASSWORD D2C_USER_PASSWORD_CONSOLE
    HDP_DATABASE_ADMIN D2C_DB_ADMIN_USERNAME D2C_DB_ADMIN_USERNAME_CONSOLE
    HDP_DATABASE_ADMIN_PASSWORD D2C_DB_ADMIN_PASSWORD D2C_DB_ADMIN_PASSWORD_CONSOLE
    HDP_DATABASE_USER D2C_DB_USER_USERNAME D2C_DB_USER_USERNAME_CONSOLE
    HDP_DATABASE_USER_PASSWORD D2C_DB_USER_PASSWORD D2C_DB_USER_PASSWORD_CONSOLE