Você está na página 1de 3

Hortonworks Ambari Installation in CENTOS 7.

This document is prepared with the below software configurations:

 CentOS Linux release 7.4.1708 (Core)


 Ambari-2.6.0.0
 HDP-2.6.3.0
 HDP-UTILS-1.1.0.21
 OpenJDK 1.8.0_161

Prerequisites:

1) Check the Disk space in the all the Host and Target machines
2) Confirm the time zone is set to same in all the machines
3) Edit the hosts file in all the machines and add the respective IP address

nano /etc/hosts

192.168.1.8 master.hadoop.com master


192.168.1.9 node1.hadoop.com node1

4) Update the machine to download the latest version and fixes using the below command
sudo yum update -y
5) Add SUDO user if it is required
Adding the user as SUDO user

adding server user:


adduser suser
passwd suser
time147
usermod -aG wheel suser

check sudo permissions :

su - suser
sudo ls -la /root

adding client user :


adduser cuser
passwd cuser
time258
usermod -aG wheel cuser
su - cuser
sudo ls -la /root

6) SSH Password less connection


Login as Root User
Master Node : Login as ROOT ONLY
ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
cd ~/.ssh/
cat id_rsa.pub >> authorized_keys
ssh localhost
cat id_rsa.pub >> authorized_keys
ssh-copy-id -i id_rsa.pub root@192.168.1.9
systemctl restart sshd.service

Slave Nodes : LOGIN AS ROOT ONLY


cd ~/.ssh/
chmod 600 ~/.ssh/authorized_keys

7) Install the webserver and test the communication

sudo yum install httpd -y


service httpd start
cp /etc/httpd/conf/httpd.conf ~/httpd.conf.backup
sudo systemctl status httpd.service
sudo systemctl enable httpd.service
sudo systemctl restart httpd.service
sudo firewall-cmd --add-service=http --permanent && sudo firewall-cmd --add-
service=https --permanent
sudo systemctl restart firewalld

8) Download the below repositories

Ambari 2.6.0 Repositories : http://public-repo-


1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/ambari-2.6.0.0-centos7.tar.gz

HDP : http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0/HDP-2.6.3.0-
centos7-rpm.tar.gz

HDP UTILS : http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7/HDP-


UTILS-1.1.0.21-centos7.tar.gz

and proceed to the below steps:


sudo mkdir -p /var/www/html/repo/
sudo tar -zxvf ambari-2.6.0.0-centos7.tar.gz -C /var/www/html/repo/
sudo tar -zxvf HDP-2.6.3.0-centos7-rpm.tar.gz -C /var/www/html/repo/
sudo mkdir -p /var/www/html/repo/HDP-UTILS-1.1.0.21
sudo tar -zxvf HDP-UTILS-1.1.0.21-centos7.tar.gz -C /var/www/html/repo/HDP-UTILS-1.1.0.21

9) Stop and Disable firewall ( In all the nodes )

Stop Firewall and SELinux

sudo systemctl disable firewalld


sudo systemctl stop firewalld
sudo systemctl status firewalld

sudo sed -i 's/^\(SELINUX\s*=\s*\).*$/\1disabled/' /etc/selinux/config

10) Create a repo file

sudo nano hdp.repo


[HDP-2.6.3.0]
name=HDP Version - HDP-2.6.3.0
baseurl=http://192.168.1.8/repo/HDP/centos7/2.6.3.0-235/
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/RPM-
GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

sudo nano hdp-util.repo


[HDP-UTILS-1.1.0.21]
name=HDP Utils Version - HDP-UTILS-1.1.0.21
baseurl=http://192.168.1.8/repo/HDP-UTILS-1.1.0.21/
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/RPM-
GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

sudo nano ambari.repo


[Ambari]
name=Ambari
baseurl=http://192.168.1.8/repo/ambari/centos7/2.6.0.0-267/
gpgcheck=1
gpgkey=http://public-repo-
1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/RPM-GPG-KEY/RPM-GPG-KEY-
Jenkins
enabled=1
priority=1

11) Install and setup Ambari Server

sudo yum install ambari-server


sudo ambari-server setup
sudo ambari-server start

Você também pode gostar