Skip to content

Instantly share code, notes, and snippets.

@Roconda
Created July 31, 2015 07:59
Show Gist options
  • Save Roconda/a108a89a858789f3e183 to your computer and use it in GitHub Desktop.
Save Roconda/a108a89a858789f3e183 to your computer and use it in GitHub Desktop.
Ambari MySQL install on CentOS 6

Ambari uses a local postgres db by default. This page describes how to configure ambari-server with a local mysql server.

Install Ambari

Get the latest Ambari from the repository. Note that you should use the newest version listed on the documentation page.

Install the 3rd party repository:

cd /etc/yum.repos.d/
yum install wget
wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/BUILDS/2.1.0-1409/ambaribn.repo

Install the Ambari package:

yum update
yum install ambari-server

Install the mysql dependencies:

yum install mysql-server mysql-connector-java

Ensure your connector is installed in the right directory:

ls /usr/share/java/mysql-connector-java.jar

Add your hostname to the hosts configuration file for correct resolving your local hostname:

LOCAL_IP="127.0.0.1  "
LOCAL_IP+=$(hostname -f)
echo $LOCAL_IP >> /etc/hosts

First setup ambari with all the default configuration:

ambari-server setup

Initialize ambari-server with the mysql jdbc connector:

ambari-server setup --jdbc-driver=/usr/share/java/mysql-connector-java.jar --jdbc-db=mysql

Run Ambari

Voila! You can now start ambari and configure the server.

ambari-server start

You can now visit the admin interface on port 8080.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment