Set Up the Ambari Server
Before starting the Ambari Server, you must set up the Ambari Server. Setup configures Ambari to talk to the Ambari database, installs the JDK and allows you to customize the user account the Ambari Server daemon will run as. The
ambari-server setup
command manages the setup process.
Prerequisites
To use MySQL as the Ambari database, you must set up the mysql connector, create a user and grant user permissions before running ambari-setup.
Using Ambari with MySQL or MariaDB
Steps
To start the setup process, run the following command on the Ambari server host. You may also append setup options to the command.
ambari-server setup -j $JAVA_HOME
Respond to the setup prompt:
Setup Options
The following table describes options frequently used for Ambari Server setup.
Option
Description
-j (or --java-home)
You must manually install the JDK on all hosts and specify the Java Home path during 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-driver
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 Ambari Server for distribution to cluster hosts during configuration. Use this option with the --jdbc-db option to specify the database type.
--jdbc-db
Specifies the database type. Valid values are: [postgres | mysql] Use this option with the --jdbc-driver option to specify the location of the JDBC driver JAR file.
-s (or --silent)
Setup runs silently. Accepts all the default prompt values*.
If you select the silent setup option, you must also include the -j (or --java-home) option.
-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.
Important *If you choose the silent setup option and do not override the JDK selection, Oracle JDK installs and you agree to the Oracle Binary Code License agreement.
Oracle JDK is NOT supported for IBM-PPC.
If the Ambari Server is behind a firewall, you must instruct the ambari-server setup commad 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 have not temporarily disabled SELinux, you may get a warning. Accept the default
y
, and continue.By default, Ambari Server runs under
root
. Accept the defaultn
at theCustomize user account for ambari-server daemon
prompt, to proceed asroot
. If you want to create a different user to run the Ambari Server, or to assign a previously created user, selecty
at theCustomize user account for ambari-server daemon
prompt, then provide a user name.If you have not temporarily disabled
iptables
you may get a warning. Entery
to continue.Select
Custom JDK
, you must manually install the JDK on all hosts and specify the Java Home path.Note Open JDK v1.8 is the only supported JDK.
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 entern
, 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.Select
y
atEnter advanced database configuration
.In
Advanced database configuration
, enterOption [3] MySQL/MariaDB
, then enter the credentials you defined for user name, password and database name.At
Proceed with configuring remote database connection properties [y/n]
choosey
.Setup completes.
Note If your host accesses the Internet through a proxy server, you must configure Ambari Server to use this proxy server.
Next Steps
More Information
Using Ambari with MySQL or MariaDB
Configuring Ambari for Non-Root