메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


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

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

참고 : 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확인)

번호 제목 날짜 조회 수
201 pom.xml에서 build.gradle로 변환 2015.09.14 310
200 바나나 파이의 /tmp폴더를 외장하드로 변경하기 2015.07.24 307
199 scala application 샘플소스(SparkSession이용) 2018.03.07 304
198 scala-eclipse 다운로드 2019.06.09 301
197 spark-sql실행시 ERROR log: Got exception: java.lang.NumberFormatException For input string: "2000ms" 오류발생시 조치사항 2016.06.09 301
196 java quartz 시간 설정 참고사항 2015.12.16 300
195 CDH 5.4.4 버전에서 hive on tez (0.7.0)설치하기 2016.01.14 299
194 [Impala TLS/SSL이슈]RangerAdminRESTClient.java:151] Failed to get response, Error is: TrustManager is not specified 2023.02.02 298
193 Cloudera Manager의 Java Heap Size변경하는 방법 2022.06.27 298
192 cloudera의 hue에서 사용자가 사용한 쿼리 목록 2020.02.07 296
191 Spark Streaming 코드레벨단에서의 성능개선 2016.10.31 292
190 javax.net.ssl.SSLHanshakeException: SSLHandshakeException invoking https://mainCluster.gooper.com:7183/api/v1/users: sun.security.validator.ValidatorException: No trusted certificate found 2022.06.29 291
189 windows7에서 lagom의 hello world를 빌드하여 실행하는 경우의 로그(mvn lagom:runAll -Dscala.binary.version=2.11) 2017.12.22 291
188 [CDP7.1.7]Hive Replication수행중 Specified catalog.database.table does not exist : hive.db명.table명 오류 발생시 조치방법 2024.04.05 290
187 Cloudera설치중에 "Error, CM server guid updated"오류 발생시 조치방법 2018.03.29 290
186 anaconda3(v5.4)를 이용하여 tensorflow설치후 ipython프로그램을 실행하여 import할때 오류발생시 조치 2018.07.27 289
185 하둡기반 데이타 모델링(6편) 2018.06.27 289
184 spark2.0.0에서 hive 2.0.1 table을 읽어 출력하는 예제 소스(HiveContext, SparkSession, SQLContext) 2017.03.09 284
183 lagom의 online-auction-java프로젝트 실행시 "Could not find Cassandra contact points, due to: ServiceLocator is not bound" 경고 발생시 조치사항 2017.10.12 281
182 [impala]쿼리 수행중 발생하는 오류(due to memory pressure: the memory usage of this transaction, Failed to write to server) 2022.10.05 279
위로