Ambari 설치-HDP 인증 이슈에 따르는...
Page content
1. 개요
Cloudera
에서 Hortonworks
가 합병 된 후 2021-01
부로
2. 설치 준비
Hostname 설정
- 모든 노드에 대해서 호스트 네임을 정해준다.(/etc/hosts에 기록 됨)
[master node]
$ hostnamectl set-hostname ambari-master
[node01]
$ hostnamectl set-hostname ambari-node01
[node02]
$ hostnamectl set-hostname ambari-node02
/etc/hosts 작성 및 복사
$ vi /etc/hosts
10.2.2.100 ambari-master
10.2.2.101 ambari-node01
10.2.2.102 ambari-node02
scp /etc/hosts root@ambari-node01
scp /etc/hosts root@ambari-node02
ssh-keygen
$ 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:E2RAq71IvdGdYTkTo1NrJQuHdO3AxuqZ/qJNAAJguqw root@ambari-master
The key's randomart image is:
+---[RSA 2048]----+
|+. .oo=+B.. |
|o. +.*=O. |
|. . . . +oXo |
|.. . = ..* =. |
|.. o =.Soo |
|. . . =+. |
|E . o.. |
| oo |
| ...o. |
+----[SHA256]-----+
ssh-copy-id
- 노드의 갯수만큼 copy를 진행한다.
[root@localhost ~]# ssh-copy-id ambari-node01
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'ambari-node01 (10.2.2.101)' can't be established.
ECDSA key fingerprint is SHA256:F2YZX6wFTKbie8d+ByBdU9Nn+LHg9fKdK+mn+c1fnS4.
ECDSA key fingerprint is MD5:a0:02:90:aa:b1:4b:5f:ac:03:47:9f:6b:59:ec:56:da.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@ambari-node01's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'ambari-node01'"
and check to make sure that only the key(s) you wanted were added.
mariadb 설치
- ranger 등 설치 시 필요하므로 미리 설치한다.
$ yum install mariadb-server
$ mysql -u root
GRANT ALL PRIVILEGES ON *.* to 'root'@'%' IDENTIFIED BY '[password]' with grant option;
GRANT ALL PRIVILEGES ON *.* to 'root'@'10.2.2.%' IDENTIFIED BY '[password]' with grant option;
3. 설치
Yum sslverify disable
- 모든 노드에 아래를 적용한다.
$ vi /etc/yum.conf
[main]
...
..
.
sslverify=0
MOGSA repo 추가
- 모든 노드에 대해서 실행 한다.
$ wget -O /etc/yum.repos.d/ambari.repo https://makeopensourcegreatagain.com/rpms/mosga.repo --no-check-certificate
Ambari 설치
$ yum install ambari-server ambari-agent -y
$ ambari-server setup -s
Ambari-agent host 수정
/etc/ambari-agent/conf/ambari-agent.ini
[server]
hostname=ambari-master
Ambari mPack 설치
$ ambari-server install-mpack --mpack=https://github.com/steven-dfheinz/dfhz_ddp_mpack/raw/master/ddp-ambari-mpack-0.0.0.4-5.tar.gz --verbose
Ambari 시작
$ ambari-server start
$ ambari-agent start
4. Ambari Configuration
베이스 팩 설치
Ambari Metric
,zookeeper
만 설치 한 후, 나머지는Stack and Versions
를 통해서 설치한다.
디렉토리 생성
- 모든 노드에 생성
$ mkdir -p /usr/ddp
$ ln -s /usr/ddp /usr/hdp
$ ln -s /usr/ddp /usr/hdf
5. TroubleShooting
Ranger 설치 시 Create User Failed
- 간혹, Ranger 설치 시, 아래의 에러가 발생이 되는데
SQLException : SQL state: HY000 java.sql.SQLException: Operation CREATE USER failed for 'root'@'ambari-master' ErrorCode: 1396
SQLException : SQL state: HY000 java.sql.SQLException: Operation CREATE USER failed for 'root'@'ambari-master' ErrorCode: 1396
- 해당되는 계정을 지워주고 재설치 하면 문제없이 설치 된다.
$ mysql -u root
drop user 'root'@'ambari-master';
flush privileges;
6. TIP
ambari mpack sample
/var/lib/ambari-server/resources/common-services
에 위치하고 있음
서비스 삭제
- Click the name of the service from the left panes of the Services tab.
- Click Service Actions > Delete.
- As prompted, remove any dependent services.
- As prompted, stop all components for the service.
- Confirm the removal.
- After the service is stopped, you must confirm the removal to proceed.
7. Reference
1. HDP 인증 이슈
2. Ambari 설치
3. Yum ssl error
4. Ambari RPM Repo
5. Ambari mpack - Packaging and Installing Custom Services