Community Articles
Find and share helpful community-sourced technical articles

You may be in a bind if you need to install HDP on Azure with CentOS 6 or RHEL 6 and certain services (not everything). By following these steps below, you will be able to use ambari-server to install HDP on any of the supported Hortonworks/Azure VMs.

1) Configure your VMs - use the same VNet for all VMs

Run the next steps as root or sudo the commands:

2) Update /etc/hosts on all your machines:

vi /etc/hosts

* use the FQDN (find the fqdn by typing hostname -f). The ip address are internal and can be found on eth0 by typing ifconfig

3) Edit /etc/sudoers.d/waagent so that you don't need to type a password when sudoing

a) change permissions on /etc/sudoers.d/waagent:

chmod 600 /etc/sudoers.d/waagent

b) update the file "username ALL = (ALL) ALL" to "username ALL = (ALL) NOPASSWD: ALL":

vi /etc/sudoers.d/waagent 

c) change permissions on /etc/sudoers.d/waagent:

chmod 440 /etc/sudoers.d/waagent 

* change username to the user that you sudo with (the user that will install Ambari)

3) Disable iptables

a) service iptables stop 
b) chkconfig iptables off 

* If you need iptables enabled, please make the necessary port configuration changes found here

4) Disable transparent huge pages

a) Run the following in your shell:

cat > /usr/local/sbin/ <<-'EOF'
#!/usr/bin/env bash
# disable transparent huge pages: for Hadoop
if [ "${thp_disable}" = true ]; then
    for path in redhat_transparent_hugepage transparent_hugepage; do
        for file in enabled defrag; do
            if test -f /sys/kernel/mm/${path}/${file}; then
                echo never > /sys/kernel/mm/${path}/${file}
exit 0
b) chmod 755 /usr/local/sbin/ 
c) sh /usr/local/sbin/ 

* Perform a-c on all hosts to disable transparent huge pages

5) If you don't have a private key generated (where the host running ambari-server can use a privat key to login to all the hosts - please perform this step)

a) ssh-keygen -t rsa -b 2048 -C "" 
b) ssh-copy-id -i /locationofgeneratedinaabove/ username@master1 

* Run b above on all hosts, this way you can ssh using the username into all hosts from the ambari-server host without a password

6) Install the ambari repo on the server where you'll install Ambari (documentation):

wget -nv -O /etc/yum.repos.d/ambari.repo

7) Install ambari-server:

yum install ambari-server 

8) Setup ambari-server:

ambari-server setup 

* You can use the defaults by pressing ENTER

9) Start ambari-server:

ambari-server start 

* This could take a few minutes to startup depending on the speed of your machine

10) Open your browser and go to the ip address where ambari-server is running http://ambariipaddress:8080

* Continue with your HDP 2.4.3 installation