sugenius

JAVA(JDK/JRE) | Apache Tomcat | Lucene | elastic(Elasticsearch/ Kibana)์„ค์น˜ ๋ฐ ํ™˜๊ฒฝ ๊ตฌ์ถ• ๋ณธ๋ฌธ

Univ./Project

JAVA(JDK/JRE) | Apache Tomcat | Lucene | elastic(Elasticsearch/ Kibana)์„ค์น˜ ๋ฐ ํ™˜๊ฒฝ ๊ตฌ์ถ•

sugeniusk 2020. 7. 23. 18:51

sub : ์ •๋ณด๊ฒ€์ƒ‰

๐Ÿ™‹

JRE(Java Runtime Enviroment ) : ์ปดํŒŒ์ผ๋œ ์ž๋ฐ” ํ”„๋กœ๊ทธ๋žจ์„ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ์ž๋ฐ” ํ™˜๊ฒฝ 
JDK(Java Development Kit)      : ์ž๋ฐ” ํ”„๋กœ๊ทธ๋ž˜๋ฐ์‹œ ํ•„์š”ํ•œ ๊ฐœ๋ฐœ ๋„๊ตฌ ํฌํ•จ (JRE+@)
(์ฐธ๊ณ  https://stackoverflow.com/questions/1906445/what-is-the-difference-between-jdk-and-jre
Apache Tomcat : ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„œ๋ฒ„(AWS).
์›น ์„œ๋ฒ„์™€ ์—ฐ๋™ํ•˜์—ฌ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ž๋ฐ” ํ™˜๊ฒฝ ์ œ๊ณต. HTTP ์„œ๋ฒ„ ์ž์ฒด ๋‚ด์žฅ. 
Apache Lucene : ๊ฒ€์ƒ‰์—”์ง„. ์ž๋ฐ”๋กœ ๊ฐœ๋ฐœ๋œ ์ •๋ณด๊ฒ€์ƒ‰ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ
elastic : Lucene ๊ธฐ๋ฐ˜์˜ Java ์˜คํ”ˆ์†Œ์Šค ๋ถ„์‚ฐ ๊ฒ€์ƒ‰ ์—”์ง„

 

1. oracle - java ์„ค์น˜(JDK/JRE)

- JDK ๋‹ค์šด  Windows x64 Installer

https://www.oracle.com/kr/java/technologies/javase/javase-downloads.html

 

- JRE ๋‹ค์šด 

https://www.oracle.com/java/technologies/

https://www.oracle.com/downloads/#category-java

https://www.java.com/ko/download/win10.jsp

 

- ๊ฒฝ๋กœ ํ™•์ธ

C:\Program Files\Java  

 

- ํ™˜๊ฒฝ๋ณ€์ˆ˜ 

ํ•ด๋‹น ๋‚ด์šฉ ์ฐธ๊ณ  

java ๊ฒฝ๋กœ ํ™•์ธ

2.tomcat ์„ค์น˜
- 64-bit Windows zip ๋‹ค์šด tomcat 9
tomcat.apache.org/download-90.cgi
์žฌ๋ถ€ํŒ… ํ›„ startup.bat ๋ฐฐ์น˜ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰
 localhost:8080 . ์ธํ„ฐ๋„ท ์ฐฝ ๊ณ ์–‘์ด ๋‚˜์˜ค๋ฉด ์—ฐ๊ฒฐ ์™„๋ฃŒ 


- ํ™˜๊ฒฝ๋ณ€์ˆ˜ 
(ํ•ด๋‹น๋‚ด์šฉ ์ฐธ๊ณ  . ์žฌ๋ถ€ํŒ…)

 

 

0. ํ™˜๊ฒฝ ๋ณ€์ˆ˜ 

- CLASSPATH - LuceneTest ๊ฒฝ๋กœ ์„ค์ •

์‹œ์Šคํ…œ ๋ณ€์ˆ˜ - CLASSPATH - (.; lucene ์œ„์น˜)


- JAVA HOME - java์˜ jdk ํŒŒ์ผ ๊ฒฝ๋กœ ์„ค์ • (JAVA JRE ๊ฒฝ๋กœ๋„ ์ถ”๊ฐ€. ์•ˆํ•ด๋„ ๋˜๊ธดํ•จ) 

์‹œ์Šคํ…œ ๋ณ€์ˆ˜ - JAVA_HOME - (java jdk ์œ„์น˜)


- Path- JAVA HOME ๊ฒฝ๋กœ ์„ค์ • //๋งˆ์ง€๋ง‰ ์ค„ 

 

์‹œ์Šคํ…œ ๋ณ€์ˆ˜ - Path - .;%JAVA_HOME%bin;


- ์‚ฌ์šฉ์ž ๋ณ€์ˆ˜ Path - java jdk ๊ฒฝ๋กœ ์ถ”๊ฐ€ (์ด ๋ฐฉ๋ฒ•์ด ํ•„์š” ์—†์„ ์ˆ˜ ์žˆ์ง€๋งŒ javac ๋ช…๋ น์ด ๋˜์ง€ ์•Š์•˜์„๋•Œ ์ด ๋ฐฉ๋ฒ•์„ ์ด์šฉํ•˜์˜€์Œ) (์ฐธ๊ณ  https://programmers.co.kr/learn/questions/188)

 

์‚ฌ์šฉ์ž๋ณ€์ˆ˜ - Path - (java jdk ์œ„์น˜)

 

 

3.lucene ์„ค์น˜
- ๋‹ค์šด 
https://lucene.apache.org/core/downloads.html
https://www.apache.org/dyn/closer.lua/lucene/java/8.6.0/lucene-8.6.0.zip
- ์••์ถ• ํ’€์–ด์„œ LuceneTest ํด๋” ์ƒ์„ฑ ํ›„ ์••์ถ• ํ•ด์ œํ•œ ํŒŒ์ผ์„ ๋„ฃ๊ณ  java ํŒŒ์ผ 4๊ฐœ ๊บผ๋‚ด๋‘๊ธฐ 
- ํ™˜๊ฒฝ๋ณ€์ˆ˜ 
ํ•ด๋‹น ๋‚ด์šฉ ์ฐธ๊ณ  

- ํ˜„์žฌ LucenTest ํด๋” ์ƒํƒœ

 

- cmd

 javac	//java ํ™•์ธ 

 

//์••์ถ• ํ’€๊ธฐ 
jar xvf lucene-analyzers-common-8.6.0.jar

jar xvf lucene-core-8.6.0.jar

jar xvf lucene-demo-8.6.0.jar

jar xvf lucene-queryparser-8.6.0.jar

์••์ถ• ํ’€๊ธฐ ์™„๋ฃŒ

 

- ์ƒ‰์ธ ์ƒ์„ฑ 

java org.apach.lucene.demo. IndexFiles -docs lucene-8.6.0 //์ƒ‰์ธ ์ƒ์„ฑ

lucene-8.6.0 ๋ฒ„์ „. ์ƒ‰์ธํ•  ๋Œ€์ƒ์ด ํŒŒ์ผ๋“ค์ด ์žˆ๋Š” ํด๋” ๊ฒฝ๋กœ 

- ๊ฒ€์ƒ‰ ํ…Œ์ŠคํŠธ 

java org.apache.lucene.demo.SearchFiles
String //Enter Query 

 

- ๊ฒ€์ƒ‰๊ฒฐ๊ณผ

 

4. Download Elasticsearch, Download Kibana

-๋‹ค์šด 
https://www.elastic.co/kr/downloads/

https://www.elastic.co/kr/downloads/kibana

์••์ถ• ํ‘ผ ํ›„ C๋“œ๋ผ์ด๋ธŒ๋กœ ์˜ฎ๊ธฐ๊ธฐ

-elasticsearch ์‹คํ–‰
elasticsearch.bat ๋ฐฐ์น˜ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰
-kibana ์‹คํ–‰ 
kibana.bat ๋ฐฐ์น˜ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ . localhost : 5601 ์‹คํ–‰ ์™„๋ฃŒ ํ™•์ธ

elasticsearch.bat ๋ฐฐ์น˜ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰

 

kibana.bat ๋ฐฐ์น˜ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ . localhost : 5601 ์‹คํ–‰ ์™„๋ฃŒ 

 

'Univ. > Project' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

์ •๋ณด๊ฒ€์ƒ‰ & ์†Œํ”„ํŠธ์›จ์–ด๊ณตํ•™  (0) 2020.07.29