0% found this document useful (0 votes)
137 views26 pages

Apache Ambari Tutorial-Fiqri

The document provides instructions for setting up an Apache Ambari cluster on a virtual machine using Vagrant and VirtualBox. It describes how to prepare the VM, configure it, set up the Ambari repository and install Ambari server, and use Ambari to create a pseudo-cluster on the single VM.

Uploaded by

Yassin Rh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views26 pages

Apache Ambari Tutorial-Fiqri

The document provides instructions for setting up an Apache Ambari cluster on a virtual machine using Vagrant and VirtualBox. It describes how to prepare the VM, configure it, set up the Ambari repository and install Ambari server, and use Ambari to create a pseudo-cluster on the single VM.

Uploaded by

Yassin Rh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Apache Ambari Tutorial

Chonnam National University


Muhammad Fiqri Muthohar
Prerequisites

 VirtualBox (https://www.virtualbox.org/wiki/Downloads)
 Vagrant (http://vagrantup.com/)
System Requirements

 Minimum 4GB RAM for the VM


 Virtualization enabled on BIOS
Prepare VM using Vagrant
Folder Creation

 Create a folder for this VM


Prepare VM using Vagrant
Adding Vagrant Box

 If you have Virtual Box and Vagrant installed on your


system, change directory to it and issue the
following command:
vagrant box add hdp_vm
https://github.com/2creatives/vagrant-
centos/releases/download/v6.5.1/centos65-
x86_64-20131205.box
Prepare VM using Vagrant
Init the VM configuration

 Once it has completed the download and added to


your library of VMs with the name hdp_vm, issue the
command:
vagrant init hdp_vm

 This will create a file “Vagrantfile” in the folder.


Open it in a text editor.
Prepare VM using Vagrant
Change Forwarded Port

 Edit the ‘Vagrantfile’, so that port 8080 on the VM is


forwarded to port 8080 on the host.
 If that port already use, change it to another port
number.
Prepare VM using Vagrant
Change VM Memory Allocation

 Modify the settings so that the VM is assigned


adequate memory once it launched.
 At least 4GB of RAM needed for this VM to run well.
Prepare VM using Vagrant
Start up The VM

 Now you can start your VM using this command:


vagrant up

 Once the VM launched, SSH in and login as root and


change the home directory of the ‘root’.
Configure the VM
Find out VM Hostname

 Find out the default hostname of the VM and note it


down. You can type this command:
hostname
Configure the VM
Configure VM ‘/etc/hosts’

 Edit the ‘/etc/hosts’ file so that we have an entry of


previous hostname that we retrieve.
Configure the VM
Install NTP service

 Install NTP service using this following command:


yum install ntp

 Once installed, turn on the NTP service with these


command:
chkconfig ntpd on
Service ntpd start

 Next we will install the wget utility with this


following command:
yum install wget
Configure the VM
Setting up password-less SSH

 Get a pair of keys using this command:


ssh-keygen

 The keys will be placed in the folder .ssh.


 Copy the id_rsa file to /vagrant folder so that you can
access the private key from the host machine as
/vagrant is automatically the shared folder between
host and guest OSs.
 Also append id_rsa.pub, the public key to the
authorized_keys keys file.
Setup Ambari
Add Ambari Repository list

 Download and copy the Ambari repository bits to


‘/etc/yum.repos.d’ :
wget http://public-repo-
1.hortonworks.com/ambari/centos6/1.x/updates
/1.4.3.38/ambari.repo
cp ambari.repo /etc/yum.repos.d

 Double check that repo has been configured


correctly by run this command:
yum repolist
Setup Ambari
Installing Ambari

 Now, we can install Ambari Server using this


command:
yum install ambari-server
Setup Ambari
Configuring Ambari

 After the installation finish, we can configure


Ambari using this command:
ambari-server setup

 You can proceed with the default configuration


during the process.
Setup Ambari
Pseudo-cluster with Ambari

 After finishing the configuration, you can access Ambari from your host
machine using your web browser.
 Access URL is http://localhost:8080, or change 8080 with your defined port in
the configuration phase before.
 Default username and password is ‘admin’ and ‘admin’.
Setup Ambari
Pseudo-cluster with Ambari (cont.)

 After login, if this your first time login to the Ambari, it will serve you wizard
setup to create your cluster.
 Name your cluster.
 Select Hadoop version.
 Input the hostname of your VM and click on the Choose File button to upload
your SSH private key before.
 Select services that you want to install.
Setup Ambari
Pseudo-cluster with Ambari (cont.)

 Finish the wizard.


 And now we have our Hadoop VM installed.
감사합니다
Thank You

You might also like