Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hadoop 김연왕 2007745012.

Similar presentations


Presentation on theme: "Hadoop 김연왕 2007745012."— Presentation transcript:

1 Hadoop 김연왕

2 Hadoop Distributed Mode
master PC와 slave PC에서의 userID는 모두 똑같이 설정. 우선 편의를 위해서 IP들을 설정. $ vi /etc/hosts xxx.xxx.xxx.xxx master xxx.xxx.xxx.xxx slave1 xxx.xxx.xxx.xxx slave2 ... 2 / 12

3 Hadoop Distributed Mode
1.master PC, slave1 PC, slave2 PC에서 다음과 같이 실행. $ssh-keygen -t rsa -f ~/.ssh/id-rsa 2.이제 공개키를 분배합니다. 이 과정은 Master PC(노드)에서만 수행하면 됩니다. $cat ~/.ssh/id-rsa.pub >> ~/.ssh/authorized-keys (slave1, slave2, slave3공개키 master의 authorized-keys파일에 추가) $ssh cat ~/.ssh/id-rsa.pub >> ~/.ssh/authorized-keys $ssh cat ~/.ssh/id-rsa.pub >> ~/.ssh/authorized-keys $ssh cat ~/.ssh/id-rsa.pub >> ~/.ssh/authorized-keys (모든 PC에 공개키 재분배. 모든 PC에서 서로의 공개키를 공유한다.) $ scp authorized-keys $ scp authorized-keys 3 / 12

4 Hadoop Distributed Mode
core-site.xml 설정 (하둡의 master. 모든 slave에서 다음과 같이 실행합니다.) $vi core-site.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>fs.default.name</name> <value>hdfs://master:9000</value> </property> </configuration> 4 / 12

5 Hadoop Distributed Mode
hdfs-site.xml 설정 (하둡의 master. 모든 slave에서 다음과 같이 실행합니다.) $vi hdfs-site.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.replication</name> <value>3</value> </property> </configuration> 5 / 12

6 Hadoop Distributed Mode
mapred-site.xml 설정 (하둡의 master. 모든 slave에서 다음과 같이 실행합니다.) $vi mapred-site.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>mapred.job.tracker</name> <value>master:9001</value> </property> </configuration> 6 / 12

7 Hadoop Distributed Mode
masters 설정 (하둡의 master. 모든 slave에서 다음과 같이 실행합니다.) $vi masters master slaves 설정 $vi slaves slave1 slave2 ... 7 / 12

8 Hadoop Distributed Mode
하둡 실행 & 확인 (하둡의 master에서만 다음과 같이 실행합니다.) $./hadoop namenode -format과 $./start-all.sh @master $jps 3734 SecondaryNameNode 4212 Jps 3831 JobTracker 3140 NameNode @slave1 $jps 3448 DataNode 4126 TaskTracker 8 / 12

9 감사합니다.


Download ppt "Hadoop 김연왕 2007745012."

Similar presentations


Ads by Google