Presentation is loading. Please wait.

Presentation is loading. Please wait.

SHARE THE KNOWLEDGE CopyLeft © 2012 BIWORLD 하둡설치 overview 2012. 10. 15(mon) BIWORLD 운영자 김기선 BIWORLD.

Similar presentations


Presentation on theme: "SHARE THE KNOWLEDGE CopyLeft © 2012 BIWORLD 하둡설치 overview 2012. 10. 15(mon) BIWORLD 운영자 김기선 BIWORLD."— Presentation transcript:

1 SHARE THE KNOWLEDGE CopyLeft © 2012 BIWORLD 하둡설치 overview 2012. 10. 15(mon) BIWORLD 운영자 김기선 BIWORLD

2 1 / 15 BI WORLD 1. 하둡설치 사전 준비사항 - 리눅스 설치 Prerequisites Redhat 기업용 레드헷 / 페도라

3 2 / 15 BI WORLD ** 리눅스 설치 개요 - 최소한의 패키지만 설치합니다. - 최소한의 데몬만 실행합니다. 리눅스 설치 1.Media Test : [Skip] 선택 / [Enter] 2.CentOS 6 설치 : [Next] 3. 언어선택 : [ 한국어 ] 4. 키보드 : [Next] 5. 설치와 관련된 장치의 종류 : [Basic Storage Devie] 선택 6. 기존시스템 설치된 경우 : [ 새로설치 ] 선택 7. 호스트명 : namenode 입력 (secondnode,datanode1,datanode2...) [Configure Network] : 네트워크 설정 옵션 8. 시간대설정 ( 서울 ) : [Next] 9. 루트 암호 입력 : *** 입력 10. 설치 종류 : [Replace Existing Linux System(s) ] 선택 [ 파티션 설정 재확인 및 수정 ] 체크 11. 파티션 편집 : 적절히 파티션 용량을 결정하시면 됩니다. [Next] -> 포멧 경고 팝업창 : [ 포멧 ] 클릭 Writing storage configuration to disk 팝업창 : [Write changes to disk] 클릭 12.Boot Loader : [Next] 13. 소프트웨어 설치 : [Minimal] 선택 + 사용자정의 설치 * 개발 : 개발용도구 * 기반시스템 : 기본, 네트워킹도구, 레거시유닉스호환성 * 서버 :FTP 서버, 시스템관리도구 * 시스템관리 :SNMP 지원, 시스템관리 14. 설치완료 : 리부팅 Prerequisites 파티션 /boot//usr/home/dataswap 용량 100M20G30G8G

4 3 / 15 BI WORLD 네트워크 설정 ( 로컬 IP ) # /etc/sysconfig/network NETWORKING=yes HOSTNAME=namenode GATEWAY=192.168.0.1 # /etc/sysconfig/network-scripts/ifcfg-eth0 NETMASK=255.255.255.0 IPADDR=192.168.0.101 GATEWAY=192.168.0.1 $ /etc/rc.d/init.d/network restart # /etc/resolv.conf nameserver 168.126.63.1 기타 필수 유틸리티 설치 $ yum -y install nmap $ yum -y install ntsysv wget...... 필수 데몬만 실행하기 $ ntsysv 서버 리부팅 $ shutdown -r now Prerequisites

5 4 / 15 BI WORLD 1. 하둡설치 사전 준비사항 - JDK 설치 1.6.0 or later version - hadoop 은 java 로 만들어진 분산파일 Framework > # RPM 으로 JDK 설치 $ rpm -ivh jdk/jdk-7u4-linux-x64.rpm # 버전에 따라 하둡 설정을 바꾸지 않도록 /usr/local/java 링크생성 $ ln -s /usr/java/jdk1.7.0_04 /usr/local/java Prerequisites

6 5 / 15 BI WORLD 2. 하둡설치 1) 방화벽 설정 - To check the status of iptables, you can use these commands under root privilege: /etc/init.d/iptables status You can simply turn iptables o, or at least open these ports: 9000; 9001; 50010; 50020; 50030; 50060; 50070; 50075; 50090 -Iptables 설정하는 부분은 인터넷에서 참조 DaemonDefault PortConfiguration Parameter HDF S Namenode50070dfs.http.address Datanodes50075dfs.datanode.http.address Secondarynamenode50090dfs.secondary.http.address Backup/Checkpoint node50105dfs.backup.http.address MRJobracker50030mapred.job.tracker.http.address Tasktrackers50060mapred.task.tracker.http.address Replaces secondarynamenode in 0.21. Hadoop daemons expose some information over HTTP. All Hadoop daemons expose the following 하둡설치 하둡사용 Port

7 6 / 15 BI WORLD 2. 하둡설치 1) 방화벽 설정 ( 계속 ) 하둡설치 DaemonDefault PortConfiguration ParameterProtocolUsed for Namenode8020 fs.default.name ? IPC: ClientProtocol Filesystem metadata operations. Datanode50010 dfs.datanode.address Custom Hadoop Xceiver: DataNode and DFSClient DFS data transfer Datanode50020 dfs.datanode.ipc.address IPC: InterDatanodeProtocol, ClientDatanodeProtocol ClientProtocol Block metadata operations and recovery Backupnode50100 dfs.backup.address Same as namenodeHDFS Metadata Operations JobtrackerIll-defined. ? mapred.job.tracker IPC: JobSubmissionProtocol, InterTrackerProtocol Job submission, task tracker heartbeats. Tasktracker127.0.0.1:0 ¤ mapred.task.tracker.report.address IPC: TaskUmbilicalProtocol Communicating with child jobs ? This is the port part of hdfs://host:8020/. ? Default is not well-defined. Common values are 8021, 9001, or 8012. See MAPREDUCE-566. Binds to an unused local port.MAPREDUCE-566 하둡사용 Port

8 7 / 15 BI WORLD 2. 하둡설치 2) 사용자 생성 Create group hadoop user: $groupadd hadoop user Create user hadoop: $useradd -g hadoop user -s /bin/bash -d /home/hadoop hadoop  in which -g species user hadoop belongs to group hadoop user, -s species the shell to use, -d species the home folder for user hadoop. Set password for user hadoop: $passwd hadoop 하둡설치 사용자 생성

9 8 / 15 BI WORLD 2. 하둡설치 3) ssh 설정 Login to each node with the account hadoop and run the following command: ssh-keygen -t rsa This command is used to generate the pair of public and private keys. \-t" species the type of keys, here we use RSA algorithm. When questions are asked, simply press enter to continue. Then two files id_rsa and id_rsa.pub are created under the folder /home/hadoop/.ssh/ Establish authentications: Now we can copy the public key of masternode to all the slavenodes. Login to masternode with account hadoop and run the following command: cat /home/hadoop/.ssh/id_rsa.pub /home/hadoop/.ssh/authorized_keys scp /home/hadoop/.ssh/id_rsa.pub >:/home/hadoop/.ssh/master.pub The second command should be executed several times until the public key is copied to all the slavenodes. Please note that ip address of slavenodei can be replaced with the domain name of slavenodei. Then we can login to each slavenode with account hadoop and run the following command: cat /home/hadoop/.ssh/master.pub /home/hadoop/.ssh/authorized_keys Then login back to masternode with account hadoop, and run ssh ip address of slavenodei to test whether masternode can login to slavenodes without password authentication. 하둡설치 SSH 설정

10 9 / 15 BI WORLD 2. 하둡설치 4) Hadoop 환경 설정 # /etc/profile 파일 수정 JAVA_HOME=/usr/local/java CLASSPATH=/usr/local/java/jre/lib/* export JAVA_HOME CLASSPATH pathmunge /usr/local/java after pathmunge /usr/local/java/bin after export HADOOP_HOME=/home/hadoop/hadoop-0.23.0 export HADOOP_CONF=/home/hadoop/hadoop-0.23.0/conf export PATH=HADOOP HOME/bin:$PATH $ source /etc/profile 하둡설치 Hadoop 환경 설정 – /etc/profile

11 10 / 15 BI WORLD 2. 하둡설치 4) Hadoop 환경 설정  hadoop-1.0.3.tar.gz 폴더 압축 해제 # $HADOOP_CONF 폴더 내의 3 개 xml 파일 설정 HADOOP_HOME/src/core/core-default.xml, HADOOP_HOME/src/hdfs/hdfs-default.xml, HADOOP_HOME/src/mapred/mapred-default.xml. 하둡설치 Hadoop 환경 설정 – $HADOOP_CONF

12 11 / 15 BI WORLD 2. 하둡설치 5) 나머지 노드 환경 설정 및 설정 완료된 hadoop 폴더 / 파일 복사 you need to set environment variables on each slavenode, like previous slides. Remote Copy Hadoop Folder to SlaveNodes Now that we have congured hadoop on the masternode, we can use remote copy command to replicate the hadoop folder to all the slavenodes. scp -r /home/hadoop/hadoop >:/home/hadoop/ 하둡설치 Hadoop 환경 설정 – 나머지 노드 환경 설정 및 hadoop 폴더 복사

13 12 / 15 BI WORLD 3. 하둡실행 To format the namenode is simple. Login to the masternode with account \hadoop", Run this command: hadoop namenode -format A message will be displayed to report the success of formatting. Then we can start the cluster: start-all.sh Alternatively, you can choose to start the le system only by using start-dfs.sh, or start map-reduce job by start-mapred.sh. To stop the cluster, use command stop-all.sh If there is no mistakes in the previous installation and conguration, we should nd no errors or exceptions in the log les in HADOOP HOME/logs/. We can use the web browser to get more information of the hadoop cluster. Here are some useful links: Hadoop Distributed File System (HDFS): http://ip address or domain name of namenode:50070 Hadoop Jobtracker: http://ip address or domain name of jobtracker:50030 Hadoop Tasktracker: http://ip address or domain name of map-reduce processor:50060 하둡설치 Hadoop 실행

14 13 / 15 BI WORLD 2. 하둡설치 appendix) hadoop cluster 구조도 – 5nodes 구성 하둡설치 Hadoop 환경 설정 – 클러스터 구조도 NameNodeSecond NN JobTracker TaskTracker DataNode 1DataNode 2DataNode 3 Zookeeper pig,hive,oozie flume,sqoop hue chukwa agent chukwa collect chukwa agent chukwa collect chukwa agent chukwa collect pig,hive,oozie chukwa HICC hue HBase MasterHBase Slave Hadoop StandAlone

15 14 / 15 BI WORLD 2. 하둡설치 1) 리눅스 설치 2) JDK 설치 1.6.0 or later version 3) 방화벽설정 (iptables – root 권한필요 ) 4) 사용자 / 사용자그룹 생성 5) ssh 설정 6) /etc/profile 설정 및 hadoop-1.0.3.tar.gz 폴더 압축 해제 후 하둡 xml 파일 설정 7) 나머지 노드에서 1)~6) 까지 반복 8) 하둡 포멧 및 하둡 기동 하둡설치 Hadoop 설치 - review

16 15 / 15 BI WORLD 하둡설치 Q & A 감사합니다.


Download ppt "SHARE THE KNOWLEDGE CopyLeft © 2012 BIWORLD 하둡설치 overview 2012. 10. 15(mon) BIWORLD 운영자 김기선 BIWORLD."

Similar presentations


Ads by Google