메뉴 건너뛰기

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확인)

번호 제목 글쓴이 날짜 조회 수
340 DataNode를 기동할때 "Block pool ID needed, but service not yet registered with NN" 오류 발생에 따른 조치사항 총관리자 2018.05.28 961
339 postgresql-9.4에서 FATAL: remaining connection slots are reserved for non-replication superuser connections가 나올때 조치 총관리자 2018.08.16 944
338 column family삭제시 Column family 'delete' does not exist오류 발생하는 경우 총관리자 2014.04.14 932
337 동일서버에서 LA와 LC동시에 기동하여 테스트 총관리자 2014.04.01 928
336 Current heap configuration for MemStore and BlockCache exceeds the threshold required for successful cluster operation 총관리자 2017.07.18 892
335 unique한 값 생성 총관리자 2014.04.25 888
334 sqoop export/import등을 할때 driver를 못찾는 오류가 발생하면... 총관리자 2014.05.15 867
333 Impala의 Queries탭에서 여러조건으로 쿼리 찾기 총관리자 2018.05.09 864
332 oozie 4.1 설치 - maven을 이용한 source compile on hadoop 2.5.2 with postgresql 9.3 총관리자 2015.04.30 862
331 Hive JDBC Connection과 유형별 에러및 필요한 jar파일 총관리자 2021.05.24 836
330 dual table만들기 총관리자 2014.05.16 826
329 hive query에서 mapreduce돌리지 않고 select하는 방법 총관리자 2014.05.23 811
328 update 샘플 총관리자 2018.03.12 810
327 oozie job 구동시 JA009: User: hadoop is not allowed to impersonate hadoop 오류나는 경우 총관리자 2014.06.02 807
326 sentry설정 방법및 활성화시 설정이 필요한 파일및 설정값, 계정생성 방법 총관리자 2018.08.16 779
325 mongodb aggregation query를 Java code로 변환한 샘플 총관리자 2016.12.15 777
324 [Kerberos]Kerberos상태의 클러스터에 JDBC로 접근할때 케이스별 오류내용 총관리자 2020.02.14 764
323 oracle to hive data type정리표 총관리자 2018.08.22 764
322 beeline실행시 User: root is not allowed to impersonate오류 발생시 조치사항 총관리자 2016.06.03 760
321 [DBeaver 4.3.0]import/export시 "Client home is not specified for connection" 오류발생시 조치사항 총관리자 2017.12.21 753

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.

위로