Ambari 설치 및 설정

realBro·2023년 11월 30일
0

Bigtop yum 저장소 추가

sudo vi /etc/yum.repos.d/bigtop.repo
# 아래 내용 추가
[bigtop]
name=Bigtop
enabled=1
gpgcheck=1
baseurl=http://repos.bigtop.apache.org/releases/3.2.0/centos/7/$basearch
gpgkey=https://dist.apache.org/repos/dist/release/bigtop/KEYS

sudo yum update

VM 클론 및 설정

  • 이름 변경 및 IP 설정 그리고 필수적으로 MAC Address를 random버튼 클릭으로 바꿔줘야한다.
  • 접속 후 ip 설정
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0
#IDADDR 변경

sudo vi /etc/hostname

노드 간 SSH 설정

Master(server01)

  • 키 생성
su ambari
cd ~
ssh-keygen
cd .ssh
cat id_rsa.pub >> authorized_keys

chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh/
sudo chmod 700 ~/

ssh-copy-id ambari@server01.hadoop.com
ssh-copy-id ambari@server02.hadoop.com
ssh-copy-id ambari@server03.hadoop.com
  • 이렇게 비밀번호 없이 접속 되면 성공

Worker(server02, 03)

chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh/
sudo chmod 700 ~/

ssh-keygen

ssh-copy-id ambari@server01.hadoop.com
ssh-copy-id ambari@server02.hadoop.com
ssh-copy-id ambari@server03.hadoop.com

Ambari 설치

Master(server01)

  • ambari-server 설치
sudo yum install ambari-agent
sudo yum install ambari-server
sudo yum install bigtop-utils
sudo yum install bigtop-ambari-mpack

Worker(server02, 03)

  • ambari-agent 설치
sudo yum install ambari-agent

Ambari setup at Master

sudo ambari-server setup

Customize user account for ambari-server daemon [y/n] (n)?  y
Enter user account for ambari-server daemon (root): ambari 
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
Enter choice (1): 2
Path to JAVA_HOME:  /usr/lib/jvm/java
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)?  n 
Enter advanced database configuration [y/n] (n)?  n 
Ambari Server 'setup' completed successfully.

PostgreSQL 설정

su root
passwd postgres # 비밀번호 설정
su postgres
psql --u postgres
create user hive password 'pwd';
create database hive;
\q #종료

vi /var/lib/pgsql/data/pg_hba.conf
# 아래에 추가
local  all  hive,ambari,mapred md5
host  all  hive,ambari,mapred 0.0.0.0/0  md5
host  all  hive,ambari,mapred ::/0 md5

systemctl restart postgresql
  • Java 8 용 드라이버 다운로드
    https://jdbc.postgresql.org/download/

  • local

    scp -P 22 ./Downloads/postgresql-42.7.0.jar ambari@192.168.56.51:/home/ambari
  • master

    sudo ambari-server setup --jdbc-db=postgres --jdbc-driver=postgresql-42.7.0.jar
    
     sudo ambari-server install-mpack --mpack=/usr/lib/bigtop-ambari-mpack/bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz --verbose
     sudo ambari-server restart

    http://192.168.56.51:8080/ 으로 접속!

참고

https://www.bearpooh.com/183
https://www.bearpooh.com/187

0개의 댓글