메뉴 건너뛰기

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 조회 수 : 307

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

번호 제목 날짜 조회 수
221 [postgresql 9.x] PostgreSQL Replication 구축하기 2018.07.17 324
220 mongodb 2.6.6 설치(64bit) 2015.09.30 323
219 VPS에서는 root로 실행해도 swap파일을 만들지 못하게 만들어 두었지만 swap파일을 생성하는 방법 2017.06.20 321
218 down된 broker로 메세지를 전송하려는 경우의 오류 내용및 조치사항 2016.08.12 321
217 [CDP7.1.7]Impala Query의 Memory Spilled 양은 ScratchFileUsedBytes값을 누적해서 구할 수 있다. 2022.07.29 320
216 Jena는 기본적으로 multi thread환경을 지원하지 않는다. 2016.08.16 320
215 로컬의 라이브러리파일들을 dependency에 포함시키는 방법 2016.08.09 320
214 [Active Directory] AD Kerberos보안 설정 변경 방법 (Maximum lifetime for user ticket, Maximum lifetime for user ticket renewal) 2024.03.12 319
213 [vi]블럭 및 문서내 복사등에 관련된 명령어 2017.02.17 319
212 숭실대 교수님등 강의영상(바이오데이터마이닝, 빅데이터분산컴퓨팅, 컴퓨터 그래픽스, 데이터베이스응용및 프로그램밍, 데이터베이스, 의생명영상처리, 웹그로그래밍, 데이터마이닝, 컴퓨터구조) file 2017.06.13 317
211 start-all.sh로 spark데몬 기동시 "JAVA_HOME is not set"오류 발생시 조치사항 2016.08.01 317
210 spark 2.3.0을 설치하가 위해서 parcel에 다음 url을 입력한다. 2018.07.15 315
209 프로그래밍 언어별 딥러닝 라이브러리 정리 file 2016.10.05 314
208 elasticsearch에서 모든 인덱스(색인)을 삭제하는 방법 2019.06.09 313
207 각 서버에 설치되는 cloudera서비스 프로그램 목록(CDH 5.14.0의 경우) 2018.03.29 313
206 federated query 예제 2017.01.19 313
205 RDF4J의 RESTFul API처리 클래스 소스 파악(web module위주) 2017.08.30 312
204 /etc/logrotate.d 을 이용한 catalina.out 나누기 file 2017.01.19 311
203 spark 2.0.0를 windows에서 실행시 로컬 파일을 읽을때 발생하는 오류 해결 방법 2017.01.12 311
202 pom.xml에서 build.gradle로 변환 2015.09.14 310
위로