๐ŸŒฑ Infra/Hadoop_HDFS

Hadoop ํ•˜๋‘ก(2.10.1)! ๋ฌด์ž‘์ • ๋”ฐ๋ผํ•˜๊ธฐ #1

mini_world 2021. 2. 27. 20:10
๋ชฉ์ฐจ ์ ‘๊ธฐ

 

์•ˆ๋…•ํ•˜์„ธ์š” ๐Ÿ™‹‍โ™€๏ธ ๐Ÿ™‹‍โ™‚๏ธ 

์ด๋ฒˆ์— ํ•˜๋‘ก์—์ฝ”์‹œ์Šคํ…œ์— ๋Œ€ํ•ด์„œ ๊ณต๋ถ€ํ•ด๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
๋‚ด์šฉ ์ •๋ฆฌํ•˜๋ฉด์„œ, ๋‚˜์ค‘์— ๋˜ ๊นŒ๋จน์„ ๋ฏธ๋ž˜์˜ ๋‚˜๋ฅผ ์œ„ํ•ด!! ํฌ์ŠคํŒ… ํ•ฉ๋‹ˆ๋‹ค. ํ•˜ํ•˜

์ €๋Š” AWS ์˜ EC2๋ฅผ ์‚ฌ์šฉํ•  ์˜ˆ์ •์ด๋ฏ€๋กœ, ๋ชจ๋“  ์ ˆ์ฐจ์— ๋‹ค EC2๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค :)

๋ชจ๋“  ๋‹จ๊ณ„๋Š” ๊ณต์‹์‚ฌ์ดํŠธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ ๋˜์—ˆ์œผ๋ฉฐ, ์ตœ์ข… ์•„ํ‚คํ…์ณ๋Š” 1๊ฐœ์˜ ๋งˆ์Šคํ„ฐ๋…ธ๋“œ, 3๊ฐœ์˜ ์Šฌ๋ ˆ์ด๋ธŒ๋…ธ๋“œ๋กœ ๊ตฌ์„ฑ๋  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค :)

์‹œ์ž‘ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. 

 

 


1. EC2 ์ƒ์„ฑํ•˜๊ธฐ

์ด๋ฒˆ ๋‹จ๊ณ„์—์„œ๋Š” EC2 ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
OS๋Š” ๋ฆฌ๋ˆ…์Šค CentOS๋ฅผ ์‚ฌ์šฉํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.!!! ๊ผญ AWS๊ฐ€ ์•„๋‹ˆ๋”๋ผ๋„ ์‚ฌ์šฉํ• ์ˆ˜ ์žˆ๋Š” ๋ฆฌ๋ˆ…์Šค ์„œ๋ฒ„(๊ฐ€์ƒ์„œ๋ฒ„) 4๋Œ€๋ฅผ ์ค€๋น„ํ•ด์ฃผ์„ธ์š”!
์ด๋ฒˆ ๋‹จ๊ณ„์—์„œ๋Š” ๊ทธ์ค‘์— ํ•˜๋‚˜๋ฅผ ๋งˆ์Šคํ„ฐ ์„œ๋ฒ„๋กœ ์‚ฌ์šฉํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค :)

๋”๋ณด๊ธฐ

AWS ์›น ์ฝ˜์†”์— ์ ‘์†ํ•œ ํ›„ EC2์„œ๋น„์Šค๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. 
๋งจ ์ฒ˜์Œ ํ™”๋ฉด์—์„œ "์ธ์Šคํ„ด์Šค ์‹œ์ž‘" ๋ฒ„ํŠผ์„ ์ฐพ์•„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ธ์Šคํ„ด์Šค๋ฅผ ๋งŒ๋“œ๋Š” ๊ณผ์ •์€ ์ด 7๋‹จ๊ณ„๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.

๋จผ์ €, 1๋‹จ๊ณ„, AMI๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ์ €๋Š” Centos7์„ ์‚ฌ์šฉํ•  ์˜ˆ์ •์ด๋ฏ€๋กœ, ๊ฒ€์ƒ‰์ฐฝ์— Centos๋ฅผ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค!
AWS Marketplace ์—์„œ ๋งจ ์ฒ˜์Œ ๊ฒ€์ƒ‰๋˜๋Š” AMI๋กœ ์„ ํƒํ•˜๊ณ  ๋‹ค์Œ์œผ๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค.

2๋‹จ๊ณ„, ์ธ์Šคํ„ด์Šค ์œ ํ˜•์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ์ €๋Š” t3.medium์„ ์„ ํƒํ–ˆ์Šต๋‹ˆ๋‹ค.
์—ฌ๊ธฐ์—์„œ ๊ฒ€ํ†  ๋ฐ ์‹œ์ž‘์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. 
๋งŒ์•ฝ, VPC์„ค์ •์ด๋‚˜, EC2 Role ์ถ”๊ฐ€๊ฐ€ ํ•„์š”ํ•˜๋‹ค๋ฉด, ์—ฌ๊ธฐ์—์„œ ๋‹ค์Œ"์ธ์Šคํ„ด์Šค ์„ธ๋ถ€์ •๋ณด๊ตฌ์„ฑ"์œผ๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค.

7๋‹จ๊ณ„, ๊ฒ€ํ† ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. ์•„๋ž˜๊นŒ์ง€ ์ญ‰ ๊ฒ€ํ† ํ•œ ํ›„ ์‹œ์ž‘ํ•˜๊ธฐ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
ํ‚คํŽ˜์–ด ํŒ์—…์ฐฝ์—์„œ ๊ฐ€์ง€๊ณ ์žˆ๋Š” ํ‚ค ํŽ˜์–ด๋ฅผ ์„ ํƒํ•˜๊ฑฐ๋‚˜ ์ƒˆ ํ‚คํŽ˜์–ด๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

๋ช‡๋ถ„์ •๋„ ํ›„๋ฉด ์ธ์Šคํ„ด์Šค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์ธ์Šคํ„ด์Šค ๋ชฉ๋ก์—์„œ ์ƒˆ๋กœ ์ƒ์„ฑ๋œ ์ธ์Šคํ„ด์Šค๋ฅผ ํ™•์ธํ•˜๊ณ  ์ด๋ฆ„์„ Master.Hadoop์œผ๋กœ ๋ณ€๊ฒฝํ•˜์˜€์Šต๋‹ˆ๋‹ค. 
๊ทธ๋ฆฌ๊ณ  ํผ๋ธ”๋ฆญIP์ฃผ์†Œ๋ฅผ ํ™•์ธํ•ด์ค์‹œ๋‹ค!

์ด์ œ ์ด ์ธ์Šคํ„ด์Šค์— SSH๋กœ ์ ‘์†ํ•ฉ๋‹ˆ๋‹ค.

ssh -i <ํ‚คํŽ˜์–ด๊ฒฝ๋กœ> centos@<ํผ๋ธ”๋ฆญIP>

์ธ์Šคํ„ด์Šค์— ์ ‘์†๊นŒ์ง€ ํ–ˆ์œผ๋ฉด, ์ด๋ฒˆ ๋‹จ๊ณ„๋Š” ์—ฌ๊ธฐ์„œ ์™„๋ฃŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค :)
๋‹ค์Œ ๋‹จ๊ณ„๋กœ ๋„˜์–ด๊ฐ‘์‹œ๋‹ค!

 


2. EC2์— Java ์„ค์น˜ํ•˜๊ธฐ

Hadoop์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Linux์— Java๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. (ํ˜ธํ™˜๋˜๋Š” Java๋ฒ„์ „ ํ™•์ธ)
์ œ๊ฐ€ ์„ค์น˜ํ•  2.10.1๋ฒ„์ „์˜ ํ•˜๋‘ก์€ java 1.6 ํ˜น์€ java 1.7์ด ์„ค์น˜ ๋˜์–ด์•ผ ํ•˜๋„ค์š”. ์„ค์น˜ํ•ด ๋ด…์‹œ๋‹ค :)

๋”๋ณด๊ธฐ

์ œ๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” CentOS 7 ์—์„œ Yum ์œผ๋กœ Java 1.7 ๋ฒ„์ „ ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•œ์ง€ ํ™•์ธ ํ•˜๊ธฐ ์œ„ํ•ด, yum search ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

sudo yum search java-1.7

java 1.7๋ฒ„์ „์„ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋„ค์š” :) ์„ค์น˜ํ•ด๋ด…์‹œ๋‹ค!!

sudo yum install java-1.7* -y

์œ„ ๋ช…๋ น์–ด๋กœ ์„ค์น˜ ์ง„ํ–‰ ํ›„ ์ž˜ ์„ค์น˜๊ฐ€ ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด java ๋ฒ„์ „์„ ํ™•์ธํ•ด๋ด…๋‹ˆ๋‹ค.

sudo java -version

java 1.7 ๋ฒ„์ „์ด ์ž˜ ์„ค์น˜ ๋˜์—ˆ๋„ค์š”.
๋งŒ์•ฝ ๋‹ค๋ฅธ OS๋ฅผ ์‚ฌ์šฉํ•˜์‹œ๋Š” ๊ฒฝ์šฐ์—๋Š” ์ง์ ‘ ๋‹ค์šด๋กœ๋“œํ•˜์—ฌ ์„ค์น˜ํ•ด์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค. (java.net
์—ฌ๊ธฐ๊นŒ์ง€ ์ง„ํ–‰ ํ•˜์…จ๋‹ค๋ฉด! ๋‹ค์Œ ๋‹จ๊ณ„๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค!!

 


3. Hadoop ์„ค์น˜ํ•˜๊ธฐ 

Hadoop 2.10.1 ๋ฒ„์ „์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. (๋‹ค์šด๋กœ๋“œ๋งํฌ๋ฌธ์„œ๋งํฌ

๋”๋ณด๊ธฐ

์ด๋ฒˆ ๋‹จ๊ณ„์—์„œ๋Š” root ๊ณ„์ •์œผ๋กœ ์ง„ํ–‰ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ๋ฃจํŠธ ๊ณ„์ •์œผ๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

sudo su

wget ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ• ๊ฑด๋ฐ, wget๋ช…๋ น์–ด๊ฐ€ ์—†๋„ค์š”. ์ด ๋ช…๋ น์–ด ๋จผ์ € ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

yum install wget -y

์ด์ œ wget ๋ช…๋ น์–ด๋กœ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. 

wget https://archive.apache.org/dist/hadoop/common/hadoop-2.10.1/hadoop-2.10.1.tar.gz

์ด์ œ ํ•˜๋‘ก ํ™ˆํด๋”๊ฐ€ ๋  /usr/local ๊ฒฝ๋กœ์— ์••ํ‘น์„ ํ’€์–ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

tar -zxvf ./hadoop-2.10.1.tar.gz -C /usr/local/

๊ทธ๋ฆฌ๊ณ ๋‚˜์„œ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ๋ชฉ๋ก์„ ํ™•์ธํ•ด๋ณด๋ฉด hadoop-2.10.1 ๊ฒฝ๋กœ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ls -al /usr/local/

๋‹ค๋ฅธ ๋””๋ ‰ํ„ฐ๋ฆฌ๋Š” ๋ชจ๋‘ root์†Œ์œ ์ธ๋ฐ, ๋ฐฉ๊ธˆ ๋งŒ๋“  ํ•˜๋‘ก๋งŒ ๋‹ค๋ฅด์ฃ ! ๋ณ€๊ฒฝํ•ด์ฃผ๊ฒ ์Šต๋‹ˆ๋‹ค.

chown -R root:root /usr/local/hadoop-2.10.1/
ls -al /usr/local/

๋„ค~~ ์ด๋ ‡๊ฒŒ ๋ณ€๊ฒฝ์ด ์™„๋ฃŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!

์ด์ œ ํ•˜๋‘ก ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ด์ค๋‹ˆ๋‹ค.
/etc/profile ๊ฒฝ๋กœ์— ์•„๋ž˜ ์„ธ์ค„์„ ์ถ”๊ฐ€ํ•˜๊ณ  source ๋ช…๋ น์–ด๋กœ  ์„ค์ •์„ ์ ์šฉํ•ด์ค๋‹ˆ๋‹ค.

vi /etc/profile
export HADOOP_HOME=/usr/local/hadoop-2.10.1/
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin/:$HADOOP_HOME/sbin
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64
source /etc/profile

ํ•˜๋‚˜ ๋” ์ง„ํ–‰ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. "/usr/local/hadoop-2.10.1/etc/hadoop/hadoop-env.sh" ์ด ๊ฒฝ๋กœ์— JAVA_HOME ์„ ์„ค์ •ํ•ด์ค„๊ฒŒ์š”!

vim /usr/local/hadoop-2.10.1/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.amzn2.0.1.x86_64
(๋งจ ์•„๋žซ์ค„์— ์ถ”๊ฐ€)

๋„ค! ์ด์ œ ์ค€๋น„๊ฐ€ ์™„๋ฃŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!!!
๋‹ค์Œ ๋‹จ๊ณ„๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค!

 

 


4. Hadoop ์„ค์ •ํŒŒ์ผ ์„ค์ •ํ•˜๊ธฐ

ํ•˜๋‘ก ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋™์ž‘ ์‹œํ‚ค๊ธฐ ์œ„ํ•ด ์„ค์ •ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.
์„ค์ •ํŒŒ์ผ์€ ํ•˜๋‘ก์ด ์„ค์น˜๋˜์–ด์žˆ๋Š” ๊ฒฝ๋กœ($HADOOP_HOME)/etc/hadoop ์•„๋ž˜ ์œ„์น˜ํ•ฉ๋‹ˆ๋‹ค. 
์„ค์ •ํŒŒ์ผ ์ž‘์„ฑ์— ์˜ค๋ฅ˜๊ฐ€ ์žˆ๋‹ค๋ฉด ํ•˜๋‘ก์‹คํ–‰์ด ๋ถˆ๊ฐ€ํ•˜๊ธฐ๋•Œ๋ฌธ์— ์˜คํƒ€๊ฐ€ ์žˆ๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ๋ฐ˜๋“œ์‹œ ํ™•์ธํ•˜์„ธ์š”!

๋”๋ณด๊ธฐ

์ด ๋‹จ๊ณ„์—์„œ 4๊ฐœ์˜ ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค. 

1. core-site.xml

ํ•˜๋‘ก ์‹œ์Šคํ…œ ์„ค์ • ํŒŒ์ผ๋กœ, ๋กœ๊ทธํŒŒ์ผ, ๋„คํŠธ์›Œํฌ ํŠœ๋‹, I/OํŠœ๋‹, ํŒŒ์ผ์‹œ์Šคํ…œํŠœ๋‹, ์••์ถ• ๋“ฑ ์‹œ์Šคํ…œ ์„ค์ • ํŒŒ์ผ์ž…๋‹ˆ๋‹ค.
HDFS์™€ ๋งต๋ฆฌ๋“€์Šค์—์„œ ๊ณตํ†ต์ ์œผ๋กœ ์‚ฌ์šฉํ•  ํ™˜๊ฒฝ์ •๋ณด๋ฅผ ์ž…๋ ฅํ•˜๊ฒŒ ๋˜๋ฉฐ, core-default.xml์ด ๊ธฐ๋ณธ ๊ฐ’์ด๋ฉฐ, core-site.xml์— ์„ค์ •๊ฐ’์ด ์—†๋Š” ๊ฒฝ์šฐ ๊ธฐ๋ณธ ๊ฐ’์„ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. (๋งค๊ฐœ๋ณ€์ˆ˜์ •๋ณด)

 vi ํŽธ์ง‘๊ธฐ๋กœ core-site.xml ์„ ์—ด์–ด ์•„๋ž˜์™€ ๊ฐ™์ด ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.
vi /usr/local/hadoop-2.10.1/etc/hadoop/core-site.xml 
<configuration>
    <property>
        <name>fs.defaultFS</name>
         <value>hdfs://master:9000</value>
    </property>
</configuration>

 

2. hdfs-site.xml

HDFS์—์„œ ์‚ฌ์šฉํ•  ํ™˜๊ฒฝ์ •๋ณด๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. hdfs-default.xml์ด ๊ธฐ๋ณธ ๊ฐ’์ด๋ฉฐ, hdfs-site.xml์— ์„ค์ •๊ฐ’์ด ์—†๋Š” ๊ฒฝ์šฐ ๊ธฐ๋ณธ ๊ฐ’์„ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค (๋งค๊ฐœ๋ณ€์ˆ˜์ •๋ณด)

vi /usr/local/hadoop-2.10.1/etc/hadoop/hdfs-site.xml
<configuration>
    <property>
        <name>dfs.namenode.name.dir</name>
         <value>file:///data/namenode</value>
    </property>
    <property>
        <name>dfs.datanode.data.dir</name>
         <value>file:///data/datanode</value>
    </property>
    <property>
         <name>dfs.namenode.checkpoint.dir</name>
         <value>file:///data/namesecondary</value>
    </property>
    <property>
        <name>dfs.replication</name>
         <value>3</value>
    </property>
</configuration>

  

3. yarn-site.xml

Resource Manager ๋ฐ Node Manager์— ๋Œ€ํ•œ ๊ตฌ์„ฑ์„ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. (๋งค๊ฐœ๋ณ€์ˆ˜์ •๋ณด)

vi /usr/local/hadoop-2.10.1/etc/hadoop/yarn-site.xml 

 

<configuration>
    <property>
        <name>yarn.nodemanager.local-dirs</name>
         <value>file:///data/yarn/local</value>
    </property>
    <property>
        <name>yarn.nodemanager.log-dirs</name>
         <value>file:///data/yarn/logs</value>
    </property>
    <property>
        <name>yarn.resourcemanager.hostname</name>
         <value>master</value>
    </property>
</configuration>

 

 

4. mapred-site.xml

MapReduce ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„ค์ • ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. (๋งค๊ฐœ๋ณ€์ˆ˜์ •๋ณด)

vi /usr/local/hadoop-2.10.1/etc/hadoop/mapred-site.xml
<configuration>
   <property>
      <name>mapreduce.framework.name</name>
      <value>yarn</value>
   </property>
</configuration>

 

์ด ๋„ค๊ฐœ์˜ ์„ค์ •ํŒŒ์ผ์„ ๋ชจ๋‘ ์œ„์™€๊ฐ™์ด ์„ค์ •ํ•˜์…จ๋‹ค๋ฉด! ๋‹ค์Œ๋‹จ๊ณ„๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค! 

 


5. EC2 ๋ณต์ œํ•˜๊ธฐ

์ด์ œ ์„ค์น˜๋œ ์ด EC2๋ฅผ 3๊ฐœ ๋” ๋ณต์ œํ•ด์„œ! ์ด 4๊ฐœ์˜ ์ธ์Šคํ„ด์Šค๋กœ ํ•˜๋‘ก ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋งŒ๋“ค๊ฒ ์Šต๋‹ˆ๋‹ค!

๋”๋ณด๊ธฐ

๋จผ์ €, AWS EC2 ์ฝ˜์†”๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
EC2๋ฅผ ์„ ํƒํ•˜๊ณ  ์ž‘์—… > ์ด๋ฏธ์ง€ ๋ฐ ํ…œํ”Œ๋ฆฟ > ์ด๋ฏธ์ง€ ์ƒ์„ฑ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ด๋ฏธ์ง€ ์ƒ์„ฑ ํŽ˜์ด์ง€์—์„œ, ์ด๋ฏธ์ง€์˜ ์ด๋ฆ„๊ณผ ์„ค๋ช…๋งŒ ์ž‘์„ฑํ•˜์‹  ํ›„ "์ด๋ฏธ์ง€ ์ƒ์„ฑ"์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

EC2์ฝ˜์†”, ์™ผ์ชฝ ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ”์—์„œ AMI๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
์‹œ๊ฐ„์ด ์กฐ๊ธˆ ์ง€๋‚œ ํ›„ ํ™•์ธํ•˜์‹œ๋ฉด avaliable ์ƒํƒœ๋กœ ๋ณ€๊ฒฝ๋œ๊ฒƒ์„ ๋ณผ ์ˆ˜์žˆ์Šต๋‹ˆ๋‹ค.
์ด์ œ, ์ด ์ด๋ฏธ์ง€๋ฅผ ์„ ํƒํ•˜๊ณ , ์ƒ๋‹จ์˜ ์ž‘์—… > ์‹œ์ž‘ํ•˜๊ธฐ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ธ์Šคํ„ด์Šค ์œ ํ˜•์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
์ €๋Š” t3.medium์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„ "๋‹ค์Œ:์ธ์Šคํ„ด์Šค ์„ธ๋ถ€์ •๋ณด ๊ตฌ์„ฑ"์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ธ์Šคํ„ด์Šค ๊ฐœ์ˆ˜๋ฅผ 3์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.
ํ•œ๋ฒˆ์— ์—ฌ๋Ÿฌ๊ฐœ์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 3์œผ๋กœ ๋ณ€๊ฒฝ ๋˜์—ˆ๋‹ค๋ฉด, ๊ฒ€ํ†  ๋ฐ ์‹œ์ž‘์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ธ์Šคํ„ด์Šค ์‹œ์ž‘ ์ „ ๊ฒ€ํ†  ํŽ˜์ด์ง€์ž…๋‹ˆ๋‹ค.
์ž˜๋ชป๋œ ๋ถ€๋ถ„์ด ์žˆ๋Š”์ง€ ํ•œ๋ฒˆ ๋” ๊ฒ€ํ† ํ•˜๊ณ  "์‹œ์ž‘ํ•˜๊ธฐ"๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์‹œ์ž‘ ํ›„ ์•ฝ๊ฐ„์˜ ์‹œ๊ฐ„์ด ํ๋ฅด๋ฉด, ์•„๋ž˜ ์‚ฌ์ง„์ฒ˜๋Ÿผ ๋„ค๊ฐœ์˜ ์ธ์Šคํ„ด์Šค๊ฐ€ ์šด์˜์ค‘์ธ ์ƒํƒœ๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.
์ €๋Š” ๊ตฌ๋ถ„ํ•˜๊ธฐ ํŽธํ•˜๋„๋ก Name์„ ๋ณ€๊ฒฝํ•ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค.

์ž, ์ด์ œ ๋‹ค์Œ๋‹จ๊ณ„์—์„œ๋Š” ๊ฐ ๋…ธ๋“œ์—์„œ์˜ ์„ค์ •์„ ์ง„ํ–‰ํ•ด ๋ด…์‹œ๋‹ค!

 


 

๋„ˆ๋ฌด ๊ธธ์–ด์ ธ์„œ ํฌ์ŠคํŒ…์„ ๋‚˜๋ˆ ์„œ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~

๋‹ค์Œ ํ˜ธ์ŠคํŒ…์œผ๋กœ ๋ฟ…!

1mini2.tistory.com/84

 

Hadoop ํ•˜๋‘ก! ๋ฌด์ž‘์ • ๋”ฐ๋ผํ•˜๊ธฐ #2

์ด ํฌ์ŠคํŒ…์€ ์ด์ „ํฌ์ŠคํŒ…๊ณผ ์ด์–ด์ง‘๋‹ˆ๋‹ค :) ์ง€๊ธˆ๊นŒ์ง€ ํ•˜๋‚˜์˜ ๋…ธ๋“œ์— Java์™€ ํ•˜๋‘ก์„ ์„ค์น˜ํ•˜๊ณ , ํ•˜๋‘ก ์„ค์ •ํŒŒ์ผ์„ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” ๊ฐ ๋…ธ๋“œ์— ๋งž๊ฒŒ ์„ค์ •์„ ๋ณ€๊ฒฝํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค !

1mini2.tistory.com


 

728x90