Set up the Ambari Server

Before starting the Ambari Server, you must set up the Ambari Server. The setup configures Ambari to communicate to the Ambari database, installs the JDK, and allows you to customize the user account the Ambari Server daemon will run as.

Run the following command on the Ambari server host to initiate the setup process. You may also append Setup Options to the command.

Bash
Copy

Respond to the setup prompt:

  1. If you have not temporarily disabled SELinux, you may get a warning. Accept the default (y), and continue.
  2. By default, the Ambari Server runs under root. Accept the default (n) at the Customize user account for ambari-server daemon prompt, to proceed as root. If you want to create a different user to run the Ambari Server, or to assign a previously created user, select y at the Customize user account for ambari-server daemon prompt, then provide a user name.
  3. If you have not temporarily disabled iptables you may get a warning. Enter yto continue.
  4. Select a JDK version to download. Enter 1 to download Oracle JDK 11.

By default, the Ambari Server setup downloads and installs Oracle JDK 11 and the accompanying Java Cryptography Extension (JCE) Policy Files.

  1. To proceed with the default installation, accept the Oracle JDK license when prompted. You must accept this license to download the necessary JDK from Oracle. The JDK is installed during the deployment phase.

Alternatively, you can enter 2 to download a Custom JDK. If you choose Custom JDK, you must manually install the JDK on all hosts and specify the Java Home path.

Note To install OpenJDK, use the Custom option. Be prepared to provide the valid JAVA_HOME value to Ambari. We strongly recommend that you install the JDK packages consistently on all hosts.

  1. Review the GPL license agreement when prompted. To explicitly enable Ambari to download and install LZO data compression libraries, you must answer y. If you enter n, Ambari will not automatically install LZO on any new host in the cluster. In this case, you must ensure LZO is installed and configured appropriately. Without LZO being installed and configured, data compressed with LZO will not be readable. If you do not want Ambari to automatically download and install LZO, you must confirm your choice to proceed.
  2. Select n at Enter advanced database configuration to use the default, embedded PostgreSQL database for Ambari. The default PostgreSQL database name is ambari. The default user name and password are ambari/bigdata. Otherwise, to use an existing PostgreSQL, MySQL/MariaDB or Oracle database with Ambari, select y.
  • If you are using an existing PostgreSQL, MySQL/MariaDB, or Oracle database instance, use one of the following prompts:

You must prepare an existing database instance, before running setup and entering advanced database configuration.

Using the Microsoft SQL Server or SQL Anywhere database options are not supported.

  • To use an existing Oracle instance, and select your own database name, user name, and password for that database, enter 2.

Select the database you want to use and provide any information requested at the prompts, including host name, port, Service Name or SID, user name, and password.

  • To use an existing MySQL/MariaDB database, and select your own database name, user name, and password for that database, enter 3.

Select the database you want to use and provide any information requested at the prompts, including hostname, port, database name, user name, and password.

  • To use an existing PostgreSQL database, and select your own database name, user name, and password for that database, enter 4.

Select the database you want to use and provide any information requested at the prompts, including hostname, port, database name, user name, and password.

  1. To proceed with configuring remote database connection properties [y/n] choose y.
  2. The setup is completed succesfully.

Note If your host accesses the Internet through a proxy server, you must configure the Ambari Server to use this proxy server.

Setup Options

The following options are frequently used for Ambari Server setup.

OptionDescription
-j (or --java-home)

Specifies the JAVA_HOME path to use on the Ambari Server and all hosts in the cluster. By default when you do not specify this option, the Ambari Server setup downloads the Oracle JDK 11 binary and accompanying Java Cryptography Extension (JCE) Policy Files to /var/ lib/ambari-server/resources. The Ambari Server then installs the JDK to /usr/jdk64.

Use this option when you plan to use a JDK other than the default Oracle JDK 11. If you are using an alternate JDK, you must manually install the JDK on all hosts and specify the Java Home path during the Ambari Server setup. If you plan to use Kerberos, you must also install the JCE on all hosts.

This path must be valid on all hosts. For example: ambari-server setup –j /usr/java/default

--jdbc-driverThis should be the path to the JDBC driver JAR file. Use this option to specify the location of the JDBC driver JAR and to make that JAR available to the Ambari Server for distribution to cluster hosts during configuration. Use this option with the --jdbc-db option to specify the database type.
--jdbc-dbSpecifies the database type. Valid values are: [postgres]
-s (or --silent)

The setup runs silently. Accepts all the default prompt values, such as:

  • User account "root" for the ambari-server
  • Oracle 11 JDK (which is installed at /usr/jdk64). This can be overridden by adding the -j option and specifying an existing JDK path.
  • Embedded PostgreSQL for the Ambari DB (with database name "ambari")

By choosing the silent setup option and by not overriding the JDK selection, Oracle JDK will be installed and you will be agreeing to the Oracle Binary Code License agreement.

Do not use this option if you do not agree to the license terms.

If the Ambari Server is behind a firewall, you must instruct the ambari-server setup command to use a proxy when downloading a JDK. To do so, define the http_proxy environment variable in the shell before running the setup command. For example:

export http_proxy=http://{username}: {password}@{proxyHost}:{proxyPort} ambari-server setup

where {username} and {password} are optional.

If you do not define the http_proxy environment variable in a firewalled environment, the Oracle JDK download will not succeed.

If you want to run the Ambari Server as non-root, you must run the setup in interactive mode. When prompted to customize the ambari-server user account, provide the account information. --enable-lzo-under-gpl-license| Use this option to download and install LZO compression, subject to the General Public License. -v (or --verbose) | Prints verbose info and warning messages to the console during Setup. -g (or --debug) | Prints debug info to the console during Setup.

Sample output for the successful Ambari Server setup is shown below.

Bash
Copy
Bash
Copy

As shown above, Error extracting ambari-views-package-2.7.9.2.1.jar can be ignored.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated