-
OS
CENTOS7
3개의 클러스터를 구성.
호스트네임
아이피 주소
1
master
192.168.56.101
2
slave01
192.168.56.102
3
slave02
192.168.56.103
설치 필요한 유틸 설치
master, slave01, slave02
yum -y install vim
yum -y install wget
yum -y install ntp
systemctl start ntpd
systemctl enable ntpd
고정 아이피 설정
master
/etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=2549e334-b180-4780-9bf2-d6458520179e
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.56.101
GATEWAY=192.168.56.1
NETMASK=255.255.255.0
DNS=8.8.8.8
Systemctl restart NetworkManager
Systemctl restart network
slave01
/etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=2549e334-b180-4780-9bf2-d6458520179e
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.56.102
GATEWAY=192.168.56.1
NETMASK=255.255.255.0
DNS=8.8.8.8
Systemctl restart NetworkManager
Systemctl restart network
slave02
/etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=2549e334-b180-4780-9bf2-d6458520179e
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.56.103
GATEWAY=192.168.56.1
NETMASK=255.255.255.0
DNS=8.8.8.8
Systemctl restart NetworkManager
Systemctl restart network
호스트 네임 설정
master
hostnamectl set-hostname master
slave01
hostnamectl set-hostname slave01
slave02
hostnamectl set-hostname slave02
/etc/hosts 설정
master
/etc/hosts
192.168.56.101 master
192.168.56.102 slave01
192.168.56.103 slave02
slave01
hostnamectl set-hostname slave01
/etc/hosts
192.168.56.101 master
192.168.56.102 slave01
192.168.56.103 slave02
slave02
hostnamectl set-hostname slave02
/etc/hosts
192.168.56.101 master
192.168.56.102 slave01
192.168.56.103 slave02
ssh설정
master
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh-copy-id -i ~/.ssh/id_rsa slave01
ssh-copy-id -i ~/.ssh/id_rsa slave02
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
slave01
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh-copy-id -i ~/.ssh/id_rsa master
ssh-copy-id -i ~/.ssh/id_rsa slave02
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
slave02
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh-copy-id -i ~/.ssh/id_rsa master
ssh-copy-id -i ~/.ssh/id_rsa slave01
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
master, slvae01, slvae02
systemctl disable firewalld
systemctl stop firewalld
master, slave01, slave02 모두 reboot !
ambari 설치
master
wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
yum repolist
yum -y install ambari-server
ambari-server setup
모든 질문에 대해서 디폴트!