드레스룸 시스템행거 인테리어

반응형

Hadoop - 호튼웍스(hortonworks) HDP 설치 2

 

 

 

 

설치환경 vm centos 7.6 

master node 1

worker node 2

edge node 1

 

2020/07/31 - [hadoop] - Hadoop - 호튼웍스 (hortonworks) HDP 설치 1

 

Hadoop - 호튼웍스 (hortonworks) HDP 설치 1

Hadoop - 호튼웍스(hortonworks) HDP 설치 1 Hortonworks Data Platform(HDP)은 분산 스토리지 및 대규모 멀티 소스 데이터 세트 처리를 위한 오픈소스 프레임워크입니다. HDP는 고객의 IT 인프라를 현대화하고 클.

kyumdoctor.tistory.com

 

 

 

이전 글에 이어서 오늘은 hortonworks HDP의 설치 준비 단계이다. 

 

간단하겠지만 그래도 한번 준비해 봤다.

Prepare the enviroment

 

  • Set up password-less SSH

  • Enable NTP on the cluster and on the Browser Host

  • Edit the Host File

  • Set the Hostname

  • Edit the Network Configuration File

  • Configuring iptables

  • Disable SELinux and Packagekit and check the umask value

 

 

 

 

Edit the Host File  + Set the Hostname

 

2020/07/20 - [linux] - linux - hostname, hosts 파일 및 hosts.deny hosts.allow 알아보기

 

linux - hostname, hosts 파일 및 hosts.deny hosts.allow 알아보기

linux hostname, hosts 파일 및 hosts.deny hosts.allow 알아보기 hostname 이란 시스템 네트워크 장치에 할당된 이름이다. 쉽게 다른 서버들에게 IP가 아닌 별칭으로 설정해 접근할 수 있다. vmware 가상 서버 (..

kyumdoctor.tistory.com

 

all nodes

192.168.6.150   master
192.168.6.151   node01
192.168.6.152   node02
192.168.6.153   node03

 

모든 노드의 /etc/hosts에 위와 같이 ip address와 hostname을 설정해준다.

 

사실 hostname설정시 # hostnamectl  set-hostname master 이런식으로 해도 되지만 IP와 /etc/hosts파일만

 

일치하면 알아서 hostname이 입력된다.

 

 

 

 

Set up password-less SSH

 

master node

 

root@master:~# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:mqkUeeOm+NDqUxlpCEnTej/y21qu65MEbnwPBb3aT2I root@ubuntu
The key's randomart image is:
+---[RSA 2048]----+
|.+.   .          |
|o .. . .         |
| ... .. .        |
| ..o+. o         |
|  +.=o* S        |
|   *o@ E .       |
|  o.B %.+        |
|  .= B+. .       |
| .+o=**o         |
+----[SHA256]-----+

 

위와 같이 default 상태로 keygen을 생성해 준다.

 

keygen을 생성하는 이유는 master node 외에 다른 worker node와 통신을

 

자유롭게 패스워드 없이 해야 하기 때문에 생성한다. 

 

master node

root@master: cd ~/.ssh
root@master: ~/.ssh# cat id_rsa.pub >> authorized_keys
root@master: ~/.ssh# chmod 700 ~/.ssh/
root@master: ~/.ssh# chmod 600 ~/.ssh/authorized_keys
root@master: ssh-copy-id root@node01
root@master: ssh-copy-id root@node02
root@master: ssh-copy-id root@node03
root@master: ssh-copy-id root@192.168.6.150
root@master: ssh-copy-id root@192.168.6.151
root@master: ssh-copy-id root@192.168.6.152
root@master: ssh-copy-id root@192.168.6.153

 

숨김 폴더로 생성된 .ssh 폴더로 이동 후 id_rsa.pub 파일로 authorized_key 공개 키값을 넣어준다.

 

그리고 권한 수정 후 사용하는 모든 노드의 hostname과 ip로 scp복사 혹은 ssh-copy-id 명령어로 뿌려준다.

 

 

 

 

Enable NTP on the cluster and on the Browser Host

 

all nodes

[root@master ~]# yum install ntp
[root@master ~]# systemctl enable ntp
[root@master ~]# systemctl start ntp

 

모든 노드의 ntp를 설치하고 enable 시키고 start 시켜준다.

 

모든 클러스터들의 기본은 ntp로 시간 동기화가 되어야 한다.

 

 

 

 

Configuring iptables

 

all nodes

[root@master ~]# systemctl disable firewalld
[root@master ~]# systemctl stop firewalld

 

ambari가 설치 및 다른 호스트와 통신 및 설정을 하려면 특정 포트는 열려있고 사양 가능해야 하므로

 

방화벽도 disable 및 stop 시켜야 한다.

 

 

 

 

Disable SELinux and Packagekit and check the umask value

 

all nodes

[root@master ~]# setenforce 0
[root@master ~]# vim /etc/selinux/config
### change ###
# SELINUX=enforcing
SELINUX=disabled
###############

 

ambari설정이 제대로 작동하려면 selinux도 setenforce 0으로 꺼주고

 

재부팅 후에도 올라오지 않도록 selinux config를 위처럼 disable 해주도록 하자.

 

 

 

all nodes

[root@master ~]# umask
0022
[root@master ~]# umask 0022
[root@master ~]# echo umask 0022 >> /etc/profile

 

umask를 쳤을 때 위와 같이 0022로 되어있다면 그 아래줄은 할 필요 없다. 하지만 다르게 나온다면 진행해야 한다.

 

리눅스의 기본 파일 및 폴더를 생성하였을 때 기본 권한을 설정한다고 한다.

 

 

 

 

master

 

[root@master ~]# wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.5.2.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
[root@master ~]# yum repolist
[root@master ~]# yum install ambari-server
[root@master ~]# ambari-server setup

 

위와 같이 ambari repo 파일을 /etc/yum.repos.d에 ambari.repo이름으로 다운로드 후

 

yum repolist로 repository에 올려준 후 ambari-server 설치 및 setup을 하게 된다.

 

setup은 사용자마다 사용환경이 달라 머라 할지 모르겠지만 보통 설치할 때 defaults로 해준 후 나중에 변경해도 된다.

 

자세한 건 아래 내용을 해석해서 보면 될 것 같다.

 

Respond to the setup prompt:

If you have not temporarily disabled SELinux, you may get a warning. Accept the default (y), and continue.

By default, Ambari Server runs under root. Accept the default (n) at the Customize user account for ambari-server daemon prompt, to proceed as root. If you want to create a different user to run the Ambari Server, or to assign a previously created user, select y at the Customize user account for ambari-server daemon prompt, then provide a user name.

If you have not temporarily disabled iptables you may get a warning. Enter y to continue.

Select a JDK version to download. Enter 1 to download Oracle JDK 1.8. Alternatively, you can choose to enter a Custom JDK. If you choose Custom JDK, you must manually install the JDK on all hosts and specify the Java Home path.

[Note]	Note
JDK support depends entirely on your choice of Stack versions. By default, Ambari Server setup downloads and installs Oracle JDK 1.8 and the accompanying Java Cryptography Extension (JCE) Policy Files.

Accept the Oracle JDK license when prompted. You must accept this license to download the necessary JDK from Oracle. The JDK is installed during the deploy phase.

Select n at Enter advanced database configuration to use the default, embedded PostgreSQL database for Ambari. The default PostgreSQL database name is ambari. The default user name and password are ambari/bigdata. Otherwise, to use an existing PostgreSQL, MySQL/MariaDB or Oracle database with Ambari, select y.

If you are using an existing PostgreSQL, MySQL/MariaDB, or Oracle database instance, use one of the following prompts:

[Important]	Important
You must prepare a non-default database instance, before running setup and entering advanced database configuration.

[Important]	Important
Using the Microsoft SQL Server or SQL Anywhere database options are not supported.

To use an existing Oracle instance, and select your own database name, user name, and password for that database, enter 2.

Select the database you want to use and provide any information requested at the prompts, including host name, port, Service Name or SID, user name, and password.

To use an existing MySQL/MariaDB database, and select your own database name, user name, and password for that database, enter 3.

Select the database you want to use and provide any information requested at the prompts, including host name, port, database name, user name, and password.

To use an existing PostgreSQL database, and select your own database name, user name, and password for that database, enter 4.

Select the database you want to use and provide any information requested at the prompts, including host name, port, database name, user name, and password.

At Proceed with configuring remote database connection properties [y/n] choose y.

Setup completes.

[Note]	Note
If your host accesses the Internet through a proxy server, you must configure Ambari Server to use this proxy server.

 

 

master

[root@master ~]# ambari-server start
[root@master ~]# ambari-server stop
[root@master ~]# ambari-server status
Using python  /usr/bin/python
Ambari-server status
Ambari Server running
Found Ambari Server PID: 2416 at: /var/run/ambari-server/ambari-server.pid

 

마지막으로 ambari-server의 시작 종료 상태를 볼 수 있는 command이다. 

 

시작해두면 따로 끄지 않는 한 계속 runing 중이다.

반응형

'hadoop' 카테고리의 다른 글

Hadoop - 호튼웍스(hortonworks) HDP 설치 3  (2) 2020.08.10
Hadoop - 호튼웍스 (hortonworks) HDP 설치 1  (0) 2020.07.31

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band