Documents
  • Invariant Documents
  • Platform
    • Data Platform
      • Install Overview
      • System Requirement
      • Software Requirement
      • Prepare the Environment
      • Installing Ambari Server
      • Setup Ambari Server
      • Start Ambari Server
      • Single Node Install
      • Multi-Node Cluster Install
      • Cluster Install from Ambari
      • Run and monitor HDFS
    • Apache Hadoop
      • Compatible Hadoop Versions
      • HDFS
        • HDFS Architecture
        • Name Node
        • Data Node
        • File Organization
        • Storage Format
          • ORC
          • Parquet
        • Schema Design
      • Hive
        • Data Organization
        • Data Types
        • Data Definition
        • Data Manipulation
          • CRUD Statement
            • Views, Indexes, Temporary Tables
        • Cost-based SQL Optimization
        • Subqueries
        • Common Table Expression
        • Transactions
        • SerDe
          • XML
          • JSON
        • UDF
      • Oozie
      • Sqoop
        • Commands
        • Import
      • YARN
        • Overview
        • Accessing YARN Logs
    • Apache Kafka
      • Compatible Kafka Versions
      • Installation
    • Elasticsearch
      • Compatible Elasticsearch Versions
      • Installation
  • Discovery
    • Introduction
      • Release Notes
    • Methodology
    • Discovery Pipeline
      • Installation
      • DB Event Listener
      • Pipeline Configuration
      • Error Handling
      • Security
    • Inventory Manager
      • Installation
      • Metadata Management
      • Column Mapping
      • Service Configuration
      • Metadata Configuration
      • Metadata Changes and Versioning
        • Generating Artifacts
      • Reconciliation, Merging Current View
        • Running daily reconciliation and merge
      • Data Inventory Reports
    • Schema Registry
  • Process Insight
    • Process Insight
      • Overview
    • Process Pipeline
      • Data Ingestion
      • Data Storage
    • Process Dashboards
      • Panels
      • Templating
      • Alerts
        • Rules
        • Notifications
  • Content Insight
    • Content Insight
      • Release Notes
      • Configuration
      • Content Indexing Pipeline
    • Management API
    • Query DSL
    • Configuration
  • Document Flow
    • Overview
  • Polyglot Data Manager
    • Polyglot Data Manager
      • Release Notes
    • Data Store
      • Concepts
      • Sharding
    • Shippers
      • Filerelay Container
    • Processors
    • Search
    • User Interface
  • Operational Insight
    • Operational Insight
      • Release Notes
    • Data Store
      • Concepts
      • Sharding
    • Shippers
      • Filerelay Container
    • Processors
    • Search
    • User Interface
  • Data Science
    • Data Science Notebook
      • Setup JupyterLab
      • Configuration
        • Configuration Settings
        • Libraries
    • Spark DataHub
      • Concepts
      • Cluster Setup
      • Spark with YARN
      • PySpark Setup
        • DataFrame API
      • Reference
  • Product Roadmap
    • Roadmap
  • TIPS
    • Service Troubleshooting
    • Service Startup Errors
    • Debugging YARN Applications
      • YARN CLI
    • Hadoop Credentials
    • Sqoop Troubleshooting
    • Log4j Vulnerability Fix
Powered by GitBook
On this page
  1. Platform
  2. Data Platform

Setup Ambari Server

The Ambari Server must be setup before attempting to install Hadoop. If your PostgreSQL instance is configured to listen on the default port number, simply run the following command:

 ambari-server setup

This command will prompt for user input to make several decisions:

  • User Account – you can choose to use another user, different from root to run the daemon process ambari-server on the admin node. If you decide to use a different user and the user does not yet exist, it will be created.

  • Java JDK – Enter 2 at the prompt to select and download the JDK.

  • Database: - Enter n at the Enter advanced database configuration prompt to use the default, embedded PostgreSQL database for Ambari. The default PostgreSQL database name is ambari and use the default user name/password. If you would like to use an existing PostgreSQL database with Ambari instead of the default, Enter y at the prompt and provide the connection parameters for the existing database.

If your PostgreSQL instance is configured to listen on a non-default port number, perform these alternate steps to configure postgres and Ambari:

  • Open the PostgreSQL /var/lib/pgsql/data/pg_hba.conf configuration file in a text editor. Append the following lines to the end of the file to allow the ambari user to connect to the database:

Local all ambari md5
host all ambari 0.0.0.0/0  md5 
host all ambari ::/0 md5n
  • Open the /etc/sysconfig/pgsql/postgresql to enable the non-default port. For example, to use port 10432 the file would need the line:

PGPORT=10432
  • Restart the PostgreSQL database:

service postgresql restart

Connect to the database as postgres (superuser) and configure the database for Ambari:

psql -U postgres -p 10432;
postgres=# CREATE DATABASE ambari;
postgres=# CREATE USER ambari WITH ENCRYPTED PASSWORD 'changeme';
postgres=# \c ambari
ambari=# CREATE SCHEMA ambari AUTHORIZATION ambari;
ambari=# ALTER SCHEMA ambari OWNER TO ambari;
ambari=# ALTER ROLE ambari SET search_path to 'ambari','public';
ambari=# \q
  • Execute this command to setup Ambari:

ambari-server setup --database=postgres --databasehost=localhost --
databaseport=10432 --databasename=ambari --databaseusername=ambari --
databasepassword=changeme

Note: Use the following command to verify that postgres is listening on the hostname value assigned to --databasehost:

  • Execute file Ambari-DDL-Postgres-CREATE.sql in PostgreSQL to complete the configuration:

psql -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-
CREATE.sql -U ambari -p 10432 -d ambari

Note: Enter the password when prompted.

PreviousInstalling Ambari ServerNextStart Ambari Server

Last updated 5 years ago