메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


Hadoop AIX 7.1에 Hadoop설치(정리중#2)

총관리자 2016.09.20 14:29 조회 수 : 215

참고 : http://www.programering.com/a/MzMwQDMwATU.html


Today in the test by JAVA remote AIX host, suddenly thought of Linux before installing Hadoop, but do not try to Aix, would like to know whether Hadoop is installed under the Aix what will be different, so be prompted by a sudden impulse to install it again, recording the process is as follows: 

    1. Aix 압축을 풀수 있는 소프트웨어를 설치하고,  Java를 설치한다.
    2. Hadoop0.21.0 version 을 다운로드하고 특정디렉토리에 unzip한다. 예를 들어 /home/cqq/hadoop-0.21.0 

    3. Hadoop 환경변수를 아래와 같이 설정한다. 
export HADOOP_HOME=/home/cqq/hadoop-0.21.0 
export HADOOP_CONF_DIR=/home/cqq/hadoop-0.21.0/conf 
export PATH=$PATH:$HADOOP_HOME/bin; 
    4 Buddha 가 정상적으로 설치되는지 확인후에 Hadoop을 설치하면서 아래와 같은 팁을 얻었다. 
      [bash: 패스에 지정된 파일이나 디렉토리가 존재하지 않는다
       이말은 AIX의 디폴트 shell이 KSH이기 때문에 몇몇의 bash 명령문이 지원되지 않아서 발생하는 문제이다. 

       그래서 먼저 bash shell을 다운로드하여 설치하여준다.(

      가. 다운로드: http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html

      나. AIX version에 맞는 RPM버전을 다운로드한다. 나는 bash-4.2-1.aix6.1.ppc.rpm를 다운로드 받았다, 
      다. RPM packets을 AIX server에 업로드하고 설치한다(설치: rpm -ivh bash-4.2-1.aix6.1.ppc.rpm)

      라. Hadoop설치후에 JAVA_HOME을 설정한다.
    5. Hadoop으로 다시 가서 [사용법: Hadoop [--config] confdir] COMMAND tips, 성공적으로 설치되었다. 
    6. Hadoop을 시작하고 prompts에 따라서 주요한 몇몇을 설정한다.


Description: here is the installation of stand-alone version of the test, as for similar real cluster version of the installation, configuration of master and slave.


================================================================================

1. bash설치 : http://egloos.zum.com/program/v/1373097

-------------------bash설치 완료화면

IUDGTMP01:/engine/bigdata# rpm -ivh bash-4.3.30-1.aix6.1.ppc.rpm

bash                        ##################################################


        ## Binary "bash" is avaible in 32bit and 64bit ##


        The default used is 64bit


        Please change symbolic link

        for "bash" in /bin directory

        To do that type:

                # rm -f /bin/bash

                # ln -sf /opt/freeware/bin/bash_32 /bin/bash


2. JAVA_HOME등 설정 및 적용

수정 : vi ~/.profile

JAVA_HOME=/usr/java7_64

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:$JAVA_HOME/bin


적용 : $ . ~/.profile


3. hosts파일에 클러스터로 구성할 서버의 ip및 host명을 기록한다(root로 각 서버에 모두 실행)
 vi /etc/hosts

4. 필요시 방화벽 오픈(참고 : http://www.ibm.com/developerworks/aix/library/au-aixfiltering/#RequiredPackages)- AIX는 기본적으로 방화벽이 없는거 같음(?)
가. 포트 확인 : netstat -Aan | grep 22
나. AIX에서는 IPSEC을 사용하는데 사용중인지 확인
 $lslpp -l | grep -i ipsec
 아래의 프로그램이 있는지 확인
  bos.net.ipsec.keymgt
  bos.net.ipsec.rte
다. 프로그램이 있으면 아래를 실행해서 설정정보가 있는 확인한다.(없으면 ls: 0653-341 The file /dev/ipsec* does not exist.
라는 오류메세지가 출력된다)
 $ls -l /dev/ipsec*
라. 있으면 다음을 실행해서 사용을 stop한다.
 $smitty ips4_stop

5. key생성/배포
$ ssh-keygen -t rsa -P ""
Generating public/private rsa key pair.
Enter file in which to save the key (/engine/bigdata/.ssh/id_rsa):
Your identification has been saved in /engine/bigdata/.ssh/id_rsa.
Your public key has been saved in /engine/bigdata/.ssh/id_rsa.pub.
The key fingerprint is:
b2:5d:8c:b7:11:48:c1:84:5a:3b:e3:85:92:5b:0b:bd bigdata@IUDGTMP01
The key's randomart image is:
+--[ RSA 2048]----+
|       ++.       |
|      o...       |
|     = o. .      |
|    = B .o .     |
|     *.*S =      |
|    . E+ o o     |
|      . . .      |
|                 |
|                 |
+-----------------+
$
$ cd .ssh
$ ls
id_rsa       id_rsa.pub   known_hosts
$ cat id_rsa.pub >> authorized_keys
$ ls
authorized_keys  id_rsa           id_rsa.pub       known_hosts

* 복사본을 받을 서버에 접속해서 .ssh폴더를 만들어주고 scp를 실행한다.
$ scp authorized_keys bigdata@slave1:/engine/bigdata/.ssh/authorized_keys
$ scp authorized_keys bigdata@slave2:/engine/bigdata/.ssh/authorized_keys
$ scp authorized_keys bigdata@slave3:/engine/bigdata/.ssh/authorized_keys
$ scp authorized_keys bigdata@slave4:/engine/bigdata/.ssh/authorized_keys


6. zookeeper설치/실행
기존에 있는 설정을 복사하여 사용하는 경우 .sh파일의 줄끝에 ^M가 붙는 경우가 있는데..
shell을 실행할때 ": A file or directory in the path name does not exist."의 메세지가 출력된다.
이때는 아래 링크를 참조하여 ^M를 제거하고 실행시켜주면된다.
http://mwultong.blogspot.com/2007/08/vim-vi-m-m.html

-----sh의 파일내용에 ^M이 있는 경우 메세지
$ ./zkEnv.sh
: A file or directory in the path name does not exist.

*실행 : ./zkServer.sh start     <= 복사해서 쓰는 경우 chmod 755 *.sh해서 권한을 부여한후 실행한다.

7. hadoop 설치및 테스트

가.. hadoop-2.6.4.tar.gz를 다운로드하여 업로드하고 압축을 푼다.

  가. $gzip -d hadoop*

  나. $tar -xvf hadoop*

(예, 

  $mv hadoop-2.7.2-b.tar.gz hadoop-2.7.2.tar.gz

  $gzip -d hadoop-2.7.2.tar.gz

  $tar -xvf hadoop-2.7.2.tar

)


나. 심볼릭 링크 생성

$ ln -s hadoop-2.6.4 hadoop


다. start-all.sh 실행(test용, (다른 설정하지 않고 바로 실행한경우임))

sbin/start-all.sh

--> 실행결과

$ ./start-all.sh

This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh

16/09/20 20:14:25 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.

Starting namenodes on []

The authenticity of host 'localhost (127.0.0.1)' can't be established.

RSA key fingerprint is fd:61:e8:11:8e:ee:59:09:79:bd:85:26:7d:3a:1d:c5.

Are you sure you want to continue connecting (yes/no)? yes

bigdata@localhost's password:

localhost: Warning: Permanently added 'localhost' (RSA) to the list of known hosts.

localhost: Error: JAVA_HOME is not set and could not be found.

bigdata@localhost's password:

localhost: Error: JAVA_HOME is not set and could not be found.

Starting secondary namenodes [0.0.0.0]

The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.

RSA key fingerprint is fd:61:e8:11:8e:ee:59:09:79:bd:85:26:7d:3a:1d:c5.

Are you sure you want to continue connecting (yes/no)? yes

bigdata@0.0.0.0's password:

0.0.0.0: Warning: Permanently added '0.0.0.0' (RSA) to the list of known hosts.

0.0.0.0: Error: JAVA_HOME is not set and could not be found.

16/09/20 20:16:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

starting yarn daemons

starting resourcemanager, logging to /engine/bigdata/hadoop-2.6.4/logs/yarn-bigdata-resourcemanager-IUDGTMP01.out

bigdata@localhost's password:

localhost: Error: JAVA_HOME is not set and could not be found.

----------------------------------------------------------------------------------------------------

라. 데몬확인(ps -ef | grep hadoop)(test용)

$ ps -ef | grep hadoop
 bigdata  4653156  9044178   0 20:18:02  pts/0  0:00 grep hadoop
 bigdata  6488258        1   0 20:16:34  pts/0  0:03 /usr/java7_64/bin/java -Dproc_resourcemanager -Xmx1000m -Dhadoop.log.dir=/engine/bigdata/hadoop-2.6.4/logs -                      Dyarn.log.dir=/engine/bigdata/hadoop-2.6.4/logs -Dhadoop.log.file=yarn-bigdata-resourcemanager-IUDGTMP01.log -Dyarn.log.file=yarn-bigdata-resourcemanager-IUDGTMP                      01.log -Dyarn.home.dir= -Dyarn.id.str=bigdata -Dhadoop.root.logger=INFO,RFA -Dyarn.root.logger=INFO,RFA -Djava.library.path=/engine/bigdata/hadoop-2.6.4/lib/nati                      ve -Dyarn.policy.file=hadoop-policy.xml -Dhadoop.log.dir=/engine/bigdata/hadoop-2.6.4/logs -Dyarn.log.dir=/engine/bigdata/hadoop-2.6.4/logs -Dhadoop.log.file=yar                      n-bigdata-resourcemanager-IUDGTMP01.log -Dyarn.log.file=yarn-bigdata-resourcemanager-IUDGTMP01.log -Dyarn.home.dir=/engine/bigdata/hadoop-2.6.4 -Dhadoop.home.dir                      =/engine/bigdata/hadoop-2.6.4 -Dhadoop.root.logger=INFO,RFA -Dyarn.root.logger=INFO,RFA -Djava.library.path=/engine/bigdata/hadoop-2.6.4/lib/native -classpath /e                      ngine/bigdata/hadoop-2.6.4/etc/hadoop:/engine/bigdata/hadoop-2.6.4/etc/hadoop:/engine/bigdata/hadoop-2.6.4/etc/hadoop:/engine/bigdata/hadoop-2.6.4/share/hadoop/c                      ommon/lib/*:/engine/bigdata/hadoop-2.6.4/share/hadoop/common/*:/engine/bigdata/hadoop-2.6.4/share/hadoop/hdfs:/engine/bigdata/hadoop-2.6.4/share/hadoop/hdfs/lib/                      *:/engine/bigdata/hadoop-2.6.4/share/hadoop/hdfs/*:/engine/bigdata/hadoop-2.6.4/share/hadoop/yarn/lib/*:/engine/bigdata/hadoop-2.6.4/share/hadoop/yarn/*:/engine/                      bigdata/hadoop-2.6.4/share/hadoop/mapreduce/lib/*:/engine/bigdata/hadoop-2.6.4/share/hadoop/mapreduce/*:/contrib/capacity-scheduler/*.jar:/contrib/capacity-sched                      uler/*.jar:/contrib/capacity-scheduler/*.jar:/contrib/capacity-scheduler/*.jar:/engine/bigdata/hadoop-2.6.4/share/hadoop/yarn/*:/engine/bigdata/hadoop-2.6.4/shar                      e/hadoop/yarn/lib/*:/engine/bigdata/hadoop-2.6.4/etc/hadoop/rm-config/log4j.properties org.apache.hadoop.yarn.server.resourcemanager.ResourceManager

마. 각종 conf정보 수정


8. hadoop기동

 

*  경로 생성

#1, #2 for dfs

mkdir /engine/bigdata/hadoop-2.7.2/dfs

mkdir /engine/bigdata/hadoop-2.7.2/dfs/namenode


#2, #3,#4 for journal

mkdir /engine/bigdata/hadoop/journal

mkdir /engine/bigdata/hadoop/journal/data


 가. sbin/hdfs zkfc -formatZK (#1)

 나. sbin/hadoop-daemon.sh start journalnode (#2, #3, #4)

 다. sbin/hdfs namenode -format (#1, #2(namenode가 포맷되지 않았다고 하면서 namenode가 기동되지 않는 경우 #2에서 namenode를 format해준다.)

 라. sbin/hadoop-daemon.sh start namenode   (#1, #2)


* 확인

http://XXX.XXX.XXX.XXX:8088/

http://XXX.XXX.XXX.XX1:50070/    (namenode #1확인)

http://XXX.XXX.XXX.XX2:50070/    (namenode #2확인)

번호 제목 글쓴이 날짜 조회 수
740 [CDP7.1.7] oozie sqoop action으로 import혹은 export수행시 발생한 오류에 대한 자세한 로그 확인 하는 방법 gooper 2024.04.19 0
739 [Impala] alter table구문수행시 "WARNINGS: Impala does not have READ_WRITE access to path 'hdfs://nameservice1/DATA/Temp/DB/source/table01_ccd'" 발생시 조치 gooper 2024.04.26 0
738 [CDP7.1.7, Replication]Encryption Zone내 HDFS파일을 비Encryption Zone으로 HDFS Replication시 User hdfs가 아닌 hadoop으로 수행하는 방법 gooper 2024.01.15 1
737 [CDP7.1.7]Hive Replication수행중 Specified catalog.database.table does not exist : hive.db명.table명 오류 발생시 조치방법 gooper 2024.04.05 1
736 [CDP7.1.7][Replication]Table does not match version in getMetastore(). Table view original text mismatch gooper 2024.01.02 2
735 ./gradlew :composeDown 및 ./gradlew :composeUp 를 성공했을때의 메세지 gooper 2023.02.20 6
734 호출 url현황 gooper 2023.02.21 6
733 [vue storefrontui]외부 API통합하기 참고 문서 총관리자 2022.02.09 7
732 [Cloudera Agent] Metadata-Plugin throttling_logger INFO (713 skipped) Unable to send data to nav server. Will try again. gooper 2022.05.16 7
731 [CDP7.1.7, Hive Replication]Hive Replication진행중 "The following columns have types incompatible with the existing columns in their respective positions " 오류 gooper 2023.12.27 7
730 [CDP7.1.7]Oozie job에서 ERROR: Kudu error(s) reported, first error: Timed out: Failed to write batch of 774 ops to tablet 8003f9a064bf4be5890a178439b2ba91가 발생하면서 쿼리가 실패하는 경우 gooper 2024.01.05 7
729 eclipse editor 설정방법 총관리자 2022.02.01 9
728 주문히스토리 조회 총관리자 2022.04.30 10
727 [bitbucket] 2022년 3월 2일 부터 git 작업시 기존에 사용하던 비빌번호를 사용할 수 없도록 변경되었다. 총관리자 2022.04.30 10
726 oozie의 sqoop action수행시 ooize:launcher의 applicationId를 이용하여 oozie:action의 applicationId및 관련 로그를 찾는 방법 gooper 2023.07.26 10
725 주문 생성 데이터 예시 총관리자 2022.04.30 11
724 [EncryptionZone]User:testuser not allowed to do "DECRYPT_EEK" on 'testkey' gooper 2023.06.29 11
723 [CDP7.1.7]Encryption Zone내부/외부 간 데이터 이동(mv,cp)및 CTAS, INSERT SQL시 오류(can't be moved into an encryption zone, can't be moved from an encryption zone) gooper 2023.11.14 11
722 [CDP7.1.7]impala-shell수행시 간헐적으로 "-k requires a valid kerberos ticket but no valid kerberos ticket found." 오류 gooper 2023.11.16 11
721 [Encryption Zone]Encryption Zone에 생성된 table을 select할때 HDFS /tmp/zone1에 대한 권한이 없는 경우 gooper 2023.06.29 12

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로