๋กœ์ผ“๐Ÿพ
article thumbnail
[Kubernetes] ํŒŒ๋“œ(pods)์˜ ๋™์ž‘ ๋ณด์ฆ ๊ธฐ๋Šฅ
... 2021. 8. 24. 12:35

์ด ๊ธ€์€ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ณต๋ถ€ํ•œ ํ”์ ์„ ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์—์„œ ํŒŒ๋“œ ์ž์ฒด์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ํŒŒ๋“œ๋ฅผ ์ž๋™ ๋ณต๊ตฌํ•ด์„œ ํŒŒ๋“œ๊ฐ€ ํ•ญ์ƒ ๋™์ž‘ํ•˜๋„๋ก ๋ณด์žฅํ•˜๋Š” ๊ธฐ๋Šฅ์ด ์žˆ์Šต๋‹ˆ๋‹ค. deployment๋กœ ์ƒ์„ฑํ•œ ์˜ค๋ธŒ์ ํŠธ์™€ ๊ทธ๋ƒฅ ํŒŒ๋“œ ์˜ค๋ธŒ์ ํŠธ 2๊ฐœ๊ฐ€ ์žˆ๊ณ , ์ด๋ฅผ ์‚ญ์ œํ–ˆ๋‹ค๊ณ  ํ–ˆ์„ ์‹œ kubectl get pods ๋ช…๋ น์–ด๋กœ์˜ค๋ธŒ์ ํŠธ๋“ค์„ ํ™•์ธํ•ด๋ณด๋ฉด deployment ์˜ค๋ธŒ์ ํŠธ๋งŒ ์‚ด์•„์žˆ์Šต๋‹ˆ๋‹ค. deployment ์•ˆ์— ์žˆ๋Š” replicat์…‹์— ์˜ํ•ด์„œ ํŒŒ๋“œ์˜ ๊ฐฏ์ˆ˜๋ฅผ ์œ ์ง€ํ•˜๋ ค๊ณ  ํ•˜๊ธฐ ๋•Œ๋ฌธ์— deployment๋กœ ์ƒ์„ฑํ•œ ํŒŒ๋“œ๋“ค์€ ์‚ญ์ œ๋˜๋„ ๋‹ค์‹œ ์ƒ์„ฑ์ด ๋ฉ๋‹ˆ๋‹ค. age๋ฅผ ๋ด๋„ ๋‹ค์‹œ ์ƒ์„ฑ๋œ๊ฑธ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ๊ทธ๋ƒฅ ํŒŒ๋“œ๋Š” ์ด๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์ž๋™๋ณต๊ตฌ๊ฐ€ ๋ณด์žฅ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. *์ฐธ๊ณ  : ์ปจํŠธ๋กค๋Ÿฌ๋Š” ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ..

article thumbnail
[Kubernetes] kubectl exec -it ๋ช…๋ น์–ด์—์„œ -- ์˜๋ฏธ
... 2021. 8. 24. 12:28

์ด ๊ธ€์€ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ณต๋ถ€ํ•œ ํ”์ ์„ ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ๋ฐฐํฌํ•œ ํŒŒ๋“œ์— ์ ‘๊ทผ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” $ kubectl exec -it nginx-pod -- /bin/bash ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜ 2๊ฐœ์˜ ๋ช…๋ น์–ด๋ฅผ ์˜ˆ์ œ๋กœ ๋“ค์–ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. $ kubectl exec -it nginx-pod ls -l /run $ kubectl exec -it nginx-pod -- ls -l /run ์ฒซ๋ฒˆ์งธ ๋ช…๋ น์–ด๋Š” -l ์˜ต์…˜์„ exec์˜ ์˜ต์…˜์œผ๋กœ ์ธ์‹ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋‘๋ฒˆ์งธ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด ์˜๋„ํ•œ๋Œ€๋กœ /run์˜ ๊ถŒํ•œ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ฒ˜๋Ÿผ ๊ตณ์ด ํ•„์š”ํ•˜์ง€ ์•Š์•„๋„ exec๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ๋ช…์‹œ์ ์œผ๋กœ '--'๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—๋Ÿฌ๋ฅผ ์ค„์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

article thumbnail
[Node.js] Ubuntu์—์„œ Node.js ๋ฒ„์ „์—… ํ•˜๊ธฐ
... 2021. 8. 24. 12:24

distro-stable version ์„ค์น˜ (apt) ๊ฐ„๋‹จํ•˜๊ฒŒ apt๋ฅผ ์ด์šฉํ•ด ์„ค์น˜ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. $ sudo apt update $ sudo apt install nodejs $ sudo apt install npm ๊ทธ๋Ÿฐ๋ฐ ๋ฒ„์ „์ด ๋„ˆ๋ฌด ๋‚ฎ์Šต๋‹ˆ๋‹ค. ์ตœ์‹  ๋ฒ„์ „์„ ๋ฐ›๊ธฐ ์œ„ํ•ด PPA(Personal package archive)๋ฅผ ์‚ฌ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. PPA๋กœ ์„ค์น˜ NodeSource์— ์˜ํ•ด ๊ด€๋ฆฌ๋˜๋Š” PPA์—์„œ ์ข€ ๋” ์ตœ์‹  ๋ฒ„์ „์„ ๋ฐ›์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ ์ผ์ž ๊ธฐ์ค€ LTS ๋ฒ„์ „์€ 12.18.3, Latest ๋ฒ„์ „์€ 14.7.0์ธ๋ฐ Latest์ธ 14๋ฒ„์ „์œผ๋กœ ์„ค์น˜ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. $ curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_14_setup.sh ์„ค..

article thumbnail
[Kubernetes] ๋””ํ”Œ๋กœ์ด๋จผํŠธ(Deployment)์™€ yaml ์ž‘์„ฑ๋ฒ•
... 2021. 8. 20. 16:51

์ด ๊ธ€์€ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ณต๋ถ€ํ•œ ํ”์ ์„ ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ๊ธฐ๋ณธ ์˜ค๋ธŒ์ ํŠธ๋กœ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ํ•œ๊ณ„๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ํ•œ๊ณ„๋ฅผ ๊ทน๋ณตํ•˜๊ณ ์ž ๊ธฐ๋ณธ ์˜ค๋ธŒ์ ํŠธ ์™ธ ๋‹ค์–‘ํ•œ ์˜ค๋ธŒ์ ํŠธ๋“ค์ด ์กด์žฌํ•˜๋Š”๋ฐ ์ด๋ฒˆ์—” ๋””ํ”Œ๋กœ์ด๋จผํŠธ ์˜ค๋ธŒ์ ํŠธ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋””ํ”Œ๋กœ์ด๋จผํŠธ ๋””ํ”Œ๋กœ์ด๋จผํŠธ๋Š” ํ•œ๋งˆ๋””๋กœ ํŒŒ๋“œ + ๋ ˆํ”Œ๋ฆฌ์นด์…‹์ž…๋‹ˆ๋‹ค. * ์ฐธ๊ณ  : ๋ ˆํ”Œ๋ฆฌ์นด์…‹์€ ํŒŒ๋“œ์˜ ์ˆ˜๋ฅผ ๋ณด์žฅํ•ด์ฃผ๋Š” ์˜ค๋ธŒ์ ํŠธ์ž…๋‹ˆ๋‹ค. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ์—์„œ์˜ API ์„œ๋ฒ„์™€ ์ปจํŠธ๋กค๋Ÿฌ ๋งค๋‹ˆ์ €๋Š” ๋‹จ์ˆœํžˆ ํŒŒ๋“œ์˜ ๊ฐ์‹œ๊ฐ€ ์•„๋‹Œ ๋””ํ”Œ๋กœ์ด๋จผํŠธ์ฒ˜๋Ÿผ ๋‹ค์–‘ํ•œ ์˜ค๋ธŒ์ ํŠธ๋ฅผ ๊ฐ์‹œํ•ฉ๋‹ˆ๋‹ค. ๋””ํ”Œ๋กœ์ด๋จผํŠธ๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๋ช…๋ น์–ด๋กœ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ create, apply ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๋””ํ”Œ๋กœ์ด๋จผํŠธ๋กœ ์ƒ์„ฑํ•œ ํŒŒ๋“œ๋ฅผ ๋Š˜๋ฆฌ๊ณ  ์‹ถ์œผ๋ฉด scale ๋ช…๋ น์–ด๋ฅผ ๋‹ค์‹œ ์ณ์•ผํ•˜์ง€๋งŒ yaml์„ ์‚ฌ์šฉํ•˜์—ฌ ๋””ํ”Œ..

article thumbnail
[Kubernetes] ์˜ค๋ธŒ์ ํŠธ(Object)๋ž€?
... 2021. 8. 20. 16:25

์ด ๊ธ€์€ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ณต๋ถ€ํ•œ ํ”์ ์„ ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์˜ค๋ธŒ์ ํŠธ๋ž€? ํŒŒ๋“œ์™€ ๋””ํ”Œ๋กœ์ด๋จผํŠธ๋Š” ์ŠคํŽ™๊ณผ ์ƒํƒœ๊ฐ’์„ ๊ฐ€์ง€๋Š” ๋ฐ ์ด๋Ÿฌํ•œ ํŒŒ๋“œ์™€ ๋””ํ”Œ๋กœ์ด๋จผํŠธ๋ฅผ ๊ฐœ๋ณ„ ์†์„ฑ์„ ํฌํ•จํ•ด ๋ถ€๋ฅด๋Š” ๋‹จ์œ„๊ฐ€ ์˜ค๋ธŒ์ ํŠธ์ž…๋‹ˆ๋‹ค. * ์ฐธ๊ณ  : ํŒŒ๋“œ๋„ ์˜ค๋ธŒ์ ํŠธ์ด๋‹ค. ๊ธฐ๋ณธ ์˜ค๋ธŒ์ ํŠธ ๊ธฐ๋ณธ ์˜ค๋ธŒ์ ํŠธ์˜ ์ข…๋ฅ˜๋กœ๋Š” ํŒŒ๋“œ, ๋„ค์ž„์ŠคํŽ˜์ด์Šค, ๋ณผ๋ฅจ, ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. ํŒŒ๋“œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์—์„œ ์‹คํ–‰๋˜๋Š” ์ตœ์†Œ๋‹จ์œ„์ž…๋‹ˆ๋‹ค. ๋…๋ฆฝ์ ์ธ ๊ณต๊ฐ„๊ณผ IP๋ฅผ ๊ฐ€์ง€๋ฉฐ, ํ•˜๋‚˜ ์ด์ƒ์˜ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๊ฐ€์ง€์ง€๋งŒ ๋ณดํ†ต 1 ํŒŒ๋“œ 1 ์ปจํ…Œ์ด๋„ˆ ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค. ๋„ค์ž„์ŠคํŽ˜์ด์Šค ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋ฆฌ์†Œ์Šค๋“ค์„ ๊ตฌ๋ถ„ํ•ด ๊ด€๋ฆฌํ•˜๋Š” ๊ทธ๋ฃน์ž…๋‹ˆ๋‹ค. ๋ณผ๋ฅจ ๊ธฐ๋ณธ์ ์œผ๋กœ ํŒŒ๋“œ๋Š” ์–ด๋””์— ์˜์†๋˜๋Š” ๊ฐœ๋…์ด ์•„๋‹ˆ์ง€๋งŒ ํŒŒ๋“œ๊ฐ€ ์‚ฌ๋ผ์ง€๋”๋ผ๋„ ๋ณด์กด ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ฃผ๋Š” ์˜ค๋ธŒ์ ํŠธ์ž…๋‹ˆ๋‹ค. * ์ฐธ๊ณ  : ํŒŒ๋“œ๋Š” ์–ธ์ œ๋‚˜ ์ฃฝ์„์ˆ˜ ์žˆ๋Š” ์˜ค๋ธŒ์ ํŠธ์ž…๋‹ˆ๋‹ค...

article thumbnail
[Kubernetes] ์˜ค๋ธŒ์ ํŠธ ์ƒ์„ฑ์‹œ run, create, apply ์ฐจ์ด
... 2021. 8. 20. 13:06

์ด ๊ธ€์€ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ณต๋ถ€ํ•œ ํ”์ ์„ ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ๋ช…๋ น์–ด๋งŒ์œผ๋ก  ํ•œ๊ณ„๊ฐ€ ์žˆ์–ด yaml์— ์ŠคํŽ™์„ ์ž‘์„ฑ ํ›„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑํ•œ yaml ํŒŒ์ผ ๊ธฐ์ค€์œผ๋กœ run, create, apply๋กœ ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋Š”๋ฐ create, apply์„ ์ฃผ๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. run๊ณผ create ๋น„๊ต run์€ ํŒŒ๋“œ 1๊ฐœ๋งŒ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•ด์ค๋‹ˆ๋‹ค. create๋Š” ๊ทธ๋ฃน ๋‚ด ํŒŒ๋“œ 1๊ฐœ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•ด์ค๋‹ˆ๋‹ค. run์œผ๋กœ ์ƒ์„ฑํ•œ ํŒŒ๋“œ๋Š” ์ดˆ์ฝ”ํŒŒ์ด1๊ฐœ์ด๊ณ , create๋กœ ์ƒ์„ฑํ•œ ํŒŒ๋“œ๋Š” ์ดˆ์ฝ”ํŒŒ์ด ๋ฐ•์Šค ์•ˆ์— ์žˆ๋Š” ์ดˆ์ฝ”ํŒŒ์ด1๊ฐœ์ž…๋‹ˆ๋‹ค. create๊ณผ apply ๋น„๊ต ์˜ค๋ธŒ์ ํŠธ๊ฐ€ ๋””ํ”Œ๋กœ์ด๋จผํŠธ ์ผ ๊ฒฝ์šฐ replicas ๋ฅผ ์ง€์ •ํ•ด์ฃผ์–ด์„œ ํŒŒ๋“œ์˜ ๊ฐฏ์ˆ˜๋ฅผ ๋ณด์žฅ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŒ์•ฝ create๋ฅผ ์ด์šฉํ•˜์—ฌ ๋””ํ”Œ๋กœ์ด๋จผํŠธ ์ƒ์„ฑํ–ˆ์„ ๊ฒฝ์šฐ y..

article thumbnail
[JS] ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ฟ ํ‚ค ์ƒ์„ฑ, ์ €์žฅ, ์‚ญ์ œ ๊ตฌํ˜„ํ•˜๊ธฐ
... 2021. 8. 20. 10:32

์ฟ ํ‚ค(Cookie) ์ €์žฅํ•˜๊ธฐ var setCookie = function(name, value, exp) { var date = new Date(); date.setTime(date.getTime() + exp*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + date.toUTCString() + ';path=/'; }; // setCookie(๋ณ€์ˆ˜์ด๋ฆ„, ๋ณ€์ˆ˜๊ฐ’, ๊ธฐ๊ฐ„); setCookie("expend", "true", 1); ์ฟ ํ‚ค(Cookie) ๊ฐ€์ ธ์˜ค๊ธฐ var getCookie = function(name) { var value = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$..

article thumbnail
[Elastic Search+Java] Java์—์„œ Elastic Search ์‹œ์ž‘ํ•˜๊ธฐ
... 2021. 8. 19. 15:19

์ € ๊ฐ™์€ ๊ฒฝ์šฐ Elasitc Search๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ์ง์ ‘ API ๋ฌธ์„œ ๋ณด๊ณ  ์ž๋ฐ” ์ฝ”๋“œ๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. API ๋ฌธ์„œ๊ฐ€ ์˜์–ด์ด๊ธด ํ•˜์ง€๋งŒ ์ƒ๋‹นํžˆ ์ž์„ธํžˆ ๋‚˜์™€์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ ๋งํฌ๋Š” Elasitc Search ๊ณต์‹ API ๋ฐ ์‚ฌ์šฉ๋ฒ• ๋ฌธ์„œ์ž…๋‹ˆ๋‹ค. Java High Level REST Client | Java REST Client [master] | Elastic The Java High Level REST Client works on top of the Java Low Level REST client. Its main goal is to expose API specific methods, that accept request objects as an argument and return response objects,..

article thumbnail
[Elastic Search+Java] ์‚ฌ์šฉ์ž ์ธ์ฆ ๊ตฌํ˜„ํ•˜๊ธฐ Basic Authentication
... 2021. 8. 19. 14:50

์ € ๊ฐ™์€ ๊ฒฝ์šฐ Elasitc Search๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ์ง์ ‘ API ๋ฌธ์„œ ๋ณด๊ณ  ์ž๋ฐ” ์ฝ”๋“œ๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜ ๋งํฌ๋Š” Elasitc Search ๊ณต์‹ API Basic Authentication ์ž…๋‹ˆ๋‹ค. Basic authentication | Java REST Client [7.14] | Elastic Configuring basic authentication can be done by providing an HttpClientConfigCallback while building the RestClient through its builder. The interface has one method that receives an instance of org.apache.http.impl.nio.client.Ht..

article thumbnail
[ElasticSearch] ElasticSearch ์™ธ๋ถ€ ์ ‘์†ํ•˜๊ธฐ
... 2021. 8. 18. 17:34

์„œ๋ฒ„์— ElasticSearch๋ฅผ ๊ตฌ์ถ•ํ–ˆ์œผ๋ฉด ๋‚ด๋ถ€ ๋ง๊ณ  ์™ธ๋ถ€์—์„œ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋ฒˆ ๊ธ€์—์„œ๋Š” ์™ธ๋ถ€ ์ ‘๊ทผ์— ๋Œ€ํ•ด ์•Œ์•„๋ด…๋‹ˆ๋‹ค. ์„œ๋ฒ„๋Š” CentOS7์ด๊ณ , ElasticSearch์€ 7.13.4๋ฒ„์ „์ž…๋‹ˆ๋‹ค. ๋‹น์—ฐํžˆ ElasticSearch๋Š” ์ •์ƒ ์„ค์น˜๋˜์–ด์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. [ElasticSearch] ์„œ๋ฒ„ ๋‚ด ElasticSearch ์„ค์น˜ํ•˜๊ธฐ ์„œ๋ฒ„๋Š” CentOS7 ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. Elastic Search๋Š” JVM์—์„œ ๋Œ์•„๊ฐ€๊ธฐ ๋•Œ๋ฌธ์— 1.8 ์ด์ƒ์˜ JDK๊ฐ€ ์„ค์น˜๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. JDK๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์„ค์น˜๋˜์—ˆ๋‹ค ๊ฐ€์ •ํ•˜๊ฒŒ ์ง„ํ–‰ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. [STEP1] Elastic Search repo ํŒŒ์ผ ์ƒ์„ฑ $.. kingofbackend.tistory.com [STEP1] ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค. $ vi /hom..

article thumbnail
[ElasticSearch]Elasticsearch ๋ณด์•ˆ ์ ์šฉ ๋ฐฉ๋ฒ•
... 2021. 8. 18. 16:24

ElasticSearch๋Š” url์„ ์ด์šฉํ•ด์„œ ์‰ฝ๊ฒŒ ๋ฐ์ดํ„ฐ ์ „์†ก์ด ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์— ElasticSearch๋ฅผ ์ด์šฉํ•˜์—ฌ ์„œ๋น„์Šค๋ฅผ ํ•  ๋•Œ ๋ฐ˜๋“œ์‹œ ๋ณด์•ˆ์„ค์ •์„ ํ•ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ํ•ด์ฃผ์ง€ ์•Š๋Š”๋‹ค๋ฉด ์ž„์˜์˜ ์‚ฌ์šฉ์ž๊ฐ€ ๋งˆ์Œ๋Œ€๋กœ CRUD ์ž‘์—…์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋ฒˆ ๊ธ€์—์„œ๋Š” ElasticSearch์™€ Kibana์— ๋ณด์•ˆ์„ ์ ์šฉํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. *์ฐธ๊ณ  : ๋ณด์•ˆ ์ ์šฉ ๋ฒ•์€ ์•„๋ž˜ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์— ์ž์„ธํžˆ ๋‚˜์™€์žˆ์Šต๋‹ˆ๋‹ค. Set up minimal security for Elasticsearch | Elasticsearch Guide [7.12] | Elastic The ES_PATH_CONF variable is the path for the Elasticsearch configuration files. If you inst..

article thumbnail
[Linux] CentOS 7์— OpenJDK 1.8 ์„ค์น˜ํ•˜๊ธฐ
... 2021. 8. 18. 16:10

[STEP1] open-jdk 1.8 ์„ค์น˜ # yum install java-1.8.0-openjdk # yum install java-1.8.0-openjdk-devel ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด /usr/bin/๊ฒฝ๋กœ์— java๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค. * ์ฐธ๊ณ  : ๋ฆฌ๋ˆ…์Šค์—์„œ๋„ JDK์™€ JRE๋Š” ๋ณ„๋„์˜ ํŒจํ‚ค์ง€์ž…๋‹ˆ๋‹ค. java-๋ฒ„์ „-openjdk ํŒจํ‚ค์ง€๊ฐ€ JRE, java-๋ฒ„์ „-openjdk-devel ํŒจํ‚ค์ง€๊ฐ€ JDK๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. JDK๊ฐ€ JRE์— ์˜์กด์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค. yum์œผ๋กœ JDK๋ฅผ ์„ค์น˜ํ•˜๋ผ๊ณ  ํ•˜๋ฉด JRE๋ฅผ ๋จผ์ € ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. [STEP2] ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๋“ฑ๋ก /usr/bin/java ๊ฒฝ๋กœ์— ์‹ฌ๋ณผ๋ฆญ๋งํฌ๊ฐ€ ๊ฑธ๋ ค์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์ œ ๊ฒฝ๋กœ๋ฅผ ์ฐพ์•„์„œ ํ™˜๊ฒฝ๋ณ€์ˆ˜์— ๋“ฑ๋กํ•ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. # readlink -f /usr/bin/java..

article thumbnail
[Kubernetes] nodeport, port, targetport ์ฐจ์ด
... 2021. 8. 17. 21:03

Kubernetes์—์„œ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” port ์œ ํ˜•์„ ์ •๋ฆฌ Port ์œ ํ˜• ์ •๋ฆฌ NodePort ์™ธ๋ถ€์—์„œ ์ ‘์†ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” ํฌํŠธ port Cluster ๋‚ด๋ถ€์—์„œ ์‚ฌ์šฉํ•  Service ๊ฐ์ฒด์˜ ํฌํŠธ targetPort Service๊ฐ์ฒด๋กœ ์ „๋‹ฌ๋œ ์š”์ฒญ์„ Pod(deployment)๋กœ ์ „๋‹ฌํ• ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ํฌํŠธ โ€‹ ์ „์ฒด ์„œ๋น„์Šค ํ๋ฆ„์œผ๋กœ ๋ณด๋ฉด NodePort --> Port --> targetPort โ€‹ ์˜ˆ์‹œ - ์•„๋ž˜ Service ๋ฆฌ์†Œ์Šค์—์„œ ์ •์˜ํ•œ port์˜ ํ๋ฆ„์„ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ํ‘œํ˜„ ๊ฐ€๋Šฅํ•จ. apiVersion: v1 kind: Service metadata: name: helloworld-service spec: ports: - nodePort: 31001 port: 8080 targetPort..

article thumbnail
[Linux] max user processes ๋Š˜๋ฆฌ๋Š” ๋ฐฉ๋ฒ•
... 2021. 8. 17. 17:36

์›์ธ java.lang.OutofMemoryError: unable to create new native thread ๋ฆฌ๋ˆ…์Šค์—์„œ ElasticSearch๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์‹คํ–‰ํ•˜๋ ค๋Š”๋ฐ ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋ฆฌ๋ˆ…์Šค์—์„œ๋Š” OS์—์„œ์˜ ์“ฐ๋ ˆ๋“œ ์ œํ•œ ์„ค์ •์ด ๊ฑธ๋ ค์žˆ์Šต๋‹ˆ๋‹ค. unlimit -a ๋ช…๋ น์–ด๋กœ soft์˜ process๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. [root@femarketWEB default]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 15026 max locked memo..

article thumbnail
[Tomcat] server.xml ์—์„œ appBase, docBase ์„ค์ • ๋ฐฉ๋ฒ•
... 2021. 8. 13. 18:07

์„œ๋ฒ„๋Š” CentOS7๋ฒ„์ „์ด๊ณ , ํ†ฐ์บฃ 8๋ฒ„์ „์ž…๋‹ˆ๋‹ค. ์  ํ‚จ์Šค์— ์˜ฌ๋ผ๊ฐ€ ์žˆ๋Š” ํ”„๋กœ์ ํŠธ์˜ server.xml ์ค‘ ์ •๋ณด๋Š” ์•„๋ž˜ ์ฝ”๋“œ์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์  ํ‚จ์Šค์—์„œ ๋นŒ๋“œ ๊ตฌ์„ฑ์„ ์‹œ์ž‘ํ•˜๋ฉด, ์ž๋™์œผ๋กœ ์  ํ‚จ์Šค๊ฐ€ ํ”„๋กœ์ ํŠธ.war ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด์ค๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ž๋™๋ฐฐํฌ ์„ค์ •๊นŒ์ง€ ์ง„ํ–‰ํ•˜๋ฉด ์œ„์— ์ •๋ณด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ํ•ด๋‹น ๋””๋ ‰ํ„ฐ๋ฆฌ์— war ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ค๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  unpackWARs ํ”„๋กœํผํ‹ฐ๋กœ ์ธํ•ด war ํŒŒ์ผ์€ ์••์ถ•์ด ํ•ด์ œ๋ฉ๋‹ˆ๋‹ค. /var/lib/jenkins/workspace ์œ„์น˜์— job ์ด๋ฆ„ ๊ธฐ์ค€์œผ๋กœ ๋””๋ ‰ํ„ฐ๋ฆฌ๋“ค์ด ์ƒ์„ฑ๋˜๊ณ , ๋””๋ ‰ํ„ฐ๋ฆฌ ์•ˆ์— warํŒŒ์ผ์ด ๋งŒ๋“ค์–ด์ง‘๋‹ˆ๋‹ค. ์ด ๋””๋ ‰ํ„ฐ๋ฆฌ ์•ˆ์— ๋งŒ๋“ค์–ด์ง„ war๊ฐ€ ์–ด๋–ป๊ฒŒ ์— ์„ค์ •ํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์ด๋™๋˜๋Š” ์ง€๋Š” ์ž˜ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค .. ์•„๋งˆ Deploy war/ear to a container ๋ผ๋Š” ์  ํ‚จ..

article thumbnail
[ElasticSearch] org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
... 2021. 8. 11. 18:06

Elasticsearch 5.0 ์ดํ›„์—์„œ๋Š” root์—์„œ elasticsearch๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์—†๊ฒŒ ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— sudo ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  Elasticsearch๋ฅผ ์‹คํ–‰ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๊ณ„์ •์„ ์ƒˆ๋กœ ์ƒ์„ฑ ํ•œ ํ›„ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•˜์—ฌ ๊ทธ ๊ณ„์ •์œผ๋กœ ์‹คํ–‰ํ•˜๋ฉด ํ•ด๊ฒฐ๋ฉ๋‹ˆ๋‹ค. es ๊ณ„์ •์„ ์ถ”๊ฐ€ํ•ด์ค๋‹ˆ๋‹ค. $ useradd es ํ•ด๋‹น ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์†Œ์œ ์ž๋ฅผ es๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค. $ chown -R es:es /usr/share/elasticsearch ๊ณ„์ •์„ es๋กœ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค. $ su es es ๊ณ„์ •์œผ๋กœ Elastic Search๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. $ /usr/share/elasticsearch/bin/elasticsearch *์ฐธ๊ณ  : /usr/share/elasticsearch ๋””๋ ‰ํ„ฐ๋ฆฌ ๋ง๊ณ ๋„ ์ถ”๊ฐ€์ ์œผ๋กœ elasticsear..

article thumbnail
[ElasticSearch] ์„œ๋ฒ„ ๋‚ด ElasticSearch ์„ค์น˜ํ•˜๊ธฐ
... 2021. 8. 11. 17:57

์„œ๋ฒ„๋Š” CentOS7 ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. Elastic Search๋Š” JVM์—์„œ ๋Œ์•„๊ฐ€๊ธฐ ๋•Œ๋ฌธ์— 1.8 ์ด์ƒ์˜ JDK๊ฐ€ ์„ค์น˜๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. JDK๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์„ค์น˜๋˜์—ˆ๋‹ค ๊ฐ€์ •ํ•˜๊ฒŒ ์ง„ํ–‰ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. [STEP1] Elastic Search repo ํŒŒ์ผ ์ƒ์„ฑ $ vi /etc/yum.repos.d/elasticsearch.repo repo ํŒŒ์ผ์„ ์ƒ์„ฑ ํ›„ elasticsearch.repo์— ์•„๋ž˜์™€ ๊ฐ™์€ ๋‚ด์šฉ์„ ์ ์Šต๋‹ˆ๋‹ค. * ์ฐธ๊ณ  : yum์ด ์•„๋‹Œ tar.gz ๋กœ ๋‹ค์šด๋ฐ›๊ณ  ์‹ถ์œผ์‹  ๋ถ„๋“ค์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ํ™•์ธํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. Install Elasticsearch from archive on Linux or MacOS | Elasticsearch Guide [7.14] | Elastic Typically, any clus..

article thumbnail
[Jenkins] Maven Job ์„ค์ • ๊ฐ„๋‹จํ•œ ์„ค๋ช…
... 2021. 8. 11. 17:38

๊ฐ„๋‹จํžˆ Maven Job์„ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•๊ณผ ๊ทธ ์„ค์ •์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ํ”Œ๋Ÿฌ๊ทธ์ธ ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๊ธฐ๋ณธ ์„ค์ •์œผ๋กœ ์„ค์น˜๋˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ ์™ธ ๋‹ค์Œ 2๊ฐ€์ง€๋ฅผ ์„ค์น˜ํ•˜์˜€์Šต๋‹ˆ๋‹ค. Maven Integration plugin์€ Maven Project Job์„ ์ƒ์„ฑ ๊ฐ€๋Šฅ์ผ€ ํ•ด์ฃผ๊ณ , Deploy to container Plugin์€ ๋นŒ๋“œ ํ›„ ํ†ฐ์บฃ ์„œ๋ฒ„์— ์ž๋™๋ฐฐํฌํ•˜๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  Subversion Plug-in์€ SVN์„ ์‚ฌ์šฉํ•˜๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค. ์ƒ์„ฑํ•œ Job ์ข…๋ฅ˜ Maven project๋กœ Job์„ ์ƒ์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. Job ์„ค์ • General job์˜ ๊ธฐ๋ณธ์ ์ธ ์„ค์ •์„ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ํฌ๊ฒŒ ๋ˆˆ์—ฌ๊ฒจ๋ณผ๋งŒํ•œ ์˜ต์…˜์€ ์—†์Šต๋‹ˆ๋‹ค. ํ•˜๋‹จ์— ๋ณด์‹œ๋ฉด JDK ๋ผ๋Š”๊ฒŒ ์žˆ๋Š”๋ฐ ์•ˆ๋ณด์ด์‹œ๋Š” ๋ถ„๋„ ์žˆ์„ ๊ฒ๋‹ˆ๋‹ค. Global Tool Configuration..

article thumbnail
[Jenkins] Jenkins ์‹œ๊ฐ„ ๋ณ€๊ฒฝ
... 2021. 8. 11. 16:42

vi /etc/sysconfig/jenkins ๋กœ vi ์—๋””ํ„ฐ๋ฅผ ์—ฐ ํ›„ ๋นจ๊ฐ„์ƒ‰ ๋ถ€๋ถ„์„ ์•„๋ž˜์™€ ๊ฐ™์ด ์ˆ˜์ •ํ•ด์ค๋‹ˆ๋‹ค. JENKINS_JAVA_OPTIONS="-Dorg.apache.commons.jelly.tags.fmt.timeZone=Asia/Seoul"

article thumbnail
[Jenkins] ์šฐ๋ฆฌ์˜ ์นœ์ ˆํ•œ ๋น„์„œ Jenkins
... 2021. 8. 11. 15:29

์  ํ‚จ์Šค๋Š” ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ์‹œ ์ง€์†์ ์œผ๋กœ ํ†ตํ•ฉ ์„œ๋น„์Šค๋ฅผ ์ œ๊ณตํ•˜๋Š” ํˆด์ž…๋‹ˆ๋‹ค. CI(Continuous Integration) ํˆด ์ด๋ผ๊ณ  ํ‘œํ˜„ํ•ฉ๋‹ˆ๋‹ค. ์  ํ‚จ์Šค์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ธฐ ์ „์— ์šฐ์„  CI/CD์— ๋Œ€ํ•ด ๋จผ์ € ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. CI/CD๋ž€? CI๋Š” Continuous Integration ์ฆ‰, ์ง€์†์ ์ธ ํ†ตํ•ฉ์ด๋ผ๋Š” ์˜๋ฏธ์ž…๋‹ˆ๋‹ค. ์ง€์†์ ์ธ ํ†ตํ•ฉ์ด๋ž€, ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์ƒˆ๋กœ์šด ์ฝ”๋“œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์ •๊ธฐ์ ์œผ๋กœ ๋นŒ๋“œ ๋ฐ ํ…Œ์ŠคํŠธ ๋˜์–ด ๊ณต์œ  ๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ํ†ตํ•ฉํžˆ๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. (๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด ํ•˜๋ฃจ์— ์—ฌ๋Ÿฌ๋ฒˆ๊นŒ์ง€) ์ด๋Ÿฌํ•œ CI์˜ ํ•ต์‹ฌ ๋ชฉํ‘œ๋Š” ๋ฒ„๊ทธ๋ฅผ ์‹ ์†ํ•˜๊ฒŒ ์ฐพ์•„ ํ•ด๊ฒฐํ•˜๊ณ , ์†Œํ”„ํŠธ์›จ์–ด์˜ ํ’ˆ์งˆ์„ ๊ฐœ์„ ํ•˜๊ณ , ์ƒˆ๋กœ์šด ์—…๋ฐ์ดํŠธ์˜ ๊ฒ€์ฆ ๋ฐ ๋ฆด๋ฆฌ์ฆˆ์˜ ์‹œ๊ฐ„์„ ๋‹จ์ถ•์‹œํ‚ค๋Š” ๊ฒƒ์— ์žˆ์Šต๋‹ˆ๋‹ค. CD๋ž€? ํ•ด์„ํ•˜์ž๋ฉด, ์ง€์†์ ์ธ ์„œ๋น„์Šค ์ œ๊ณต ํ˜น์€ ์ง€์†์ ์ธ ๋ฐฐํฌ ๋ผ๋Š”..

article thumbnail
[Jenkins] warํŒŒ์ผ์— 1.0.0-BUILD-SNAPSHOT ์•ˆ๋ถ™๊ฒŒ ํ•˜๊ธฐ
... 2021. 8. 11. 14:41

/var/lib/jenkins/workspace/ ๋กœ ์ด๋™ ํ›„ ๋ถ™์ง€ ์•Š๊ฒŒ ํ•˜๋ ค๋Š” ํ”„๋กœ์ ํŠธ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. ํ†ฐ์บฃ์ด ์•„๋‹Œ ์  ํ‚จ์Šค ๋‚ด workplace์ž…๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ์˜ pom.xml์— ์•„๋ž˜์™€ ๊ฐ™์ด ์ถ”๊ฐ€ํ•ด์ค๋‹ˆ๋‹ค. ..... ${project.name} .... ๊ทธ ํ›„ ๋‹ค์‹œ ๋นŒ๋“œํ•˜๊ฒŒ ๋˜๋ฉด ๋’ค์— 1.0.0-BUILD-SNAPSHOT์ด ๋ถ™์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

article thumbnail
[Jenkins] ์„œ๋ฒ„ ๋‚ด Jenkins(์  ํ‚จ์Šค) ์„ค์น˜ํ•˜๊ธฐ
... 2021. 8. 11. 14:05

ํ…Œ์ŠคํŠธ ์„œ๋ฒ„ ๋‚ด ์  ํ‚จ์Šค ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ์„œ๋ฒ„๋Š” CentOS7 ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. [STEP1] ์  ํ‚จ์Šค๊ฐ€ ์„ค์น˜๋˜์–ด์žˆ๋Š” ํ™•์ธํ•˜๊ธฐ $ yum list installed | grep jenkins [STEP2] ์  ํ‚จ์Šค ์„ค์น˜ํ•˜๊ธฐ [STEP2-1] url์— ํ•ด๋‹นํ•˜๋Š” ํŒŒ์ผ์„ /etc/yum.repos.d/jenkins.repo ๊ฒฝ๋กœ์— ๋‹ค์šด $ wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo [STEP2-2] key import $ rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key [STEP2-3] ์  ํ‚จ์Šค ์„ค์น˜ $ yum install jenkin..

article thumbnail
[Tomcat] ์„œ๋ฒ„ ๋‚ด tomcat ์„ค์น˜ํ•˜๊ธฐ
... 2021. 8. 11. 13:48

๋กœ์ปฌ์ด ์•„๋‹Œ ํ…Œ์ŠคํŠธ ์„œ๋ฒ„๋‚ด tomcat8 ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์„œ๋ฒ„๋Š” CentOS ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. ์•„์ฃผ ๊ธฐ์ดˆ์ ์ธ ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด๋Š” ์•ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜์—ฌ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. [STEP1] Apach Tomcat ์‚ฌ์ดํŠธ ์ ‘์† Apach Tomcat ์— ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค. ์ €๋Š” 8๋ฒ„์ „์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๊ธฐ์— Tomcat8์„ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค. ์˜ค๋ฅธ์ชฝ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ "๋งํฌ ์ฃผ์†Œ ๋ณต์‚ฌ"๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค. [STEP2] wget ์„ค์น˜ํ•˜๊ธฐ ์„œ๋ฒ„์— ์ ‘์† ํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค. yum install -y wget * ์ฐธ๊ณ  : yum์€ ๋ ˆ๋“œํ–‡ ๊ณ„์—ด์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €, wget๋Š” ์›น ์„œ๋ฒ„๋กœ๋ถ€ํ„ฐ ์ปจํ…์ธ ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ํ”„๋กœ๊ทธ๋žจ [STEP3] ์•Œ๋งž์€ ์œ„์น˜์— ํ†ฐ์บฃ ์„ค์น˜ ๋ฐ ์••์ถ• ํ’€๊ธฐ ์ €๋Š” /var/lib/tomcat-feadmin ์œ„์น˜์— ํ†ฐ์บฃ..

article thumbnail
๋ˆ„๊ฐ€ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ํŒŒ๊ดดํ•  ์ˆ˜ ์žˆ์„๊นŒ?
... 2021. 8. 11. 11:41

์ด ๊ธ€์€ Song Seunggeun ๋‹˜์˜ ๊ธ€์„ ๋ณด๊ณ  ์ž‘์„ฑํ•œ ๊ธ€์ด๋ฉฐ, ํ—ˆ๋ฝ์„ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. ๋…ผ๋ž€์˜ ์—ฌ์ง€๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์ง€๋งŒ, ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” 2021๋…„ ํ˜„์žฌ ์†Œํ”„ํŠธ์›จ์–ด ์—…๊ณ„์—์„œ ๊ฐ€์žฅ ์œ ๋ช…ํ•œ ์–ธ์–ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 2020๋…„ Github์˜ ๋ถ„์„์— ๋”ฐ๋ฅด๋ฉด ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” 2014๋…„ ์ด๋ž˜๋กœ ํ•ญ์ƒ ์˜ํ–ฅ๋ ฅ ์žˆ๋Š” ์–ธ์–ด์˜€๊ณ , ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ ์นœ์ฒ™์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋Š” ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ ๋˜ํ•œ ๊ทธ ์ˆœ์œ„๊ฐ€ 4์œ„์— ๋‹ฌํ•ฉ๋‹ˆ๋‹ค. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” ์–ด๋–ป๊ฒŒ ์ด๋ ‡๊ฒŒ ์œ ๋ช…ํ•ด์งˆ ์ˆ˜ ์žˆ์—ˆ์„๊นŒ์š”? ํŒŒ์ด์ฌ, ์ž๋ฐ”, C ๋“ฑ์˜ ์ „ํ†ต์˜ ๊ฐ•์ž๋“ค, ๊ทธ๋ฆฌ๊ณ  Golang, Rust, Swift, Dart ๋“ฑ์˜ ์‹ ํฅ ๊ฐ•์ž๋“ค๊ณผ์˜ ๊ฒฝ์Ÿ์—์„œ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” ์–ด๋–ป๊ฒŒ ์šฐ์œ„๋ฅผ ์ ํ•  ์ˆ˜ ์žˆ์—ˆ์„๊นŒ์š”? ์ด๋ฒˆ ๊ธ€์—์„œ๋Š” ํด๋ ˆ์ดํŠผ ํฌ๋ฆฌ์Šคํ…์Šจ ๊ต์ˆ˜์˜ ํŒŒ๊ดด์  ํ˜์‹  ์ด๋ก ์„ ์ด์šฉํ•ด์„œ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์„ฑ์žฅํ• ..

article thumbnail
[Jenkins] ์  ํ‚จ์Šค + SVN+ ๋ฉ”์ด๋ธ+์Šคํ”„๋ง์„ ์ด์šฉํ•˜์—ฌ ๋นŒ๋“œ์—…๊ณผ ์ž๋™๋ฐฐํฌ ํ•˜๊ธฐ
... 2021. 8. 9. 16:55

๋กœ์ปฌ ์„œ๋ฒ„๊ฐ€ ์•„๋‹Œ ํ…Œ์ŠคํŠธ ์„œ๋ฒ„์—์„œ ์  ํ‚จ์Šค๋ฅผ ์ด์šฉํ•˜์—ฌ CI/CD๋ฅผ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์„œ๋ฒ„๋Š” CentOS7 ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ˆœ์„œ๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. KTCloud๋ฅผ ์ด์šฉํ•˜์—ฌ ์„œ๋ฒ„ ๊ตฌ์ถ•(์ƒ๋žต) ํ…Œ์ŠคํŠธ ์„œ๋ฒ„ ๋‚ด ํ†ฐ์บฃ(port80), JDK(1.8.x) ์„ค์น˜ ํ…Œ์ŠคํŠธ ์  ํ‚จ์Šค ์„œ๋ฒ„ ๊ตฌ์ถ• ํ…Œ์ŠคํŠธ ์„œ๋ฒ„ ๋‚ด ์  ํ‚จ์Šค๋ฅผ ํ†ตํ•ด ๋นŒ๋“œ์—…๊ณผ ์ž๋™๋ฐฐํฌ ์ง„ํ–‰ [Jenkins] CI/CD์™€ ์šฐ๋ฆฌ์˜ ์นœ์ ˆํ•œ ๋น„์„œ Jenkins ์  ํ‚จ์Šค๋Š” ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ์‹œ ์ง€์†์ ์œผ๋กœ ํ†ตํ•ฉ ์„œ๋น„์Šค๋ฅผ ์ œ๊ณตํ•˜๋Š” ํˆด์ž…๋‹ˆ๋‹ค. CI(Continuous Integration) ํˆด ์ด๋ผ๊ณ  ํ‘œํ˜„ํ•ฉ๋‹ˆ๋‹ค. ์  ํ‚จ์Šค์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ธฐ ์ „์— ์šฐ์„  CI/CD์— ๋Œ€ํ•ด ๋จผ์ € ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. CI kingofbackend.tistory.com [STEP1] ํ…Œ์ŠคํŠธ ์„œ๋ฒ„ ๋‚ด ํ†ฐ์บฃ(port80)..

[Linux] yum, apt-get ์ฐจ์ด
... 2021. 7. 30. 09:20

OS ์ข…๋ฅ˜ OS ๋Š” ํฌ๊ฒŒ Windows, Linux, Unix, MacOS 4๊ฐ€์ง€๋กœ ๋ถ„๋ฅ˜๋ฉ๋‹ˆ๋‹ค. Linux ์ข…๋ฅ˜ Linux ๋Š” ํฌ๊ฒŒ ๋ ˆ๋“œํ–‡, ๋ฐ๋น„์•ˆ, ์šฐ๋ถ„ํˆฌ 3๊ฐ€์ง€๋กœ ๋ถ„๋ฅ˜๋˜๋ฉฐ, ๊ณ„์—ด์— ๋”ฐ๋ฅธ ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ๋ช…๋ น์–ด๊ฐ€ ๋‹ค๋ฆ…๋‹ˆ๋‹ค ๋ ˆ๋“œํ–‡ ๊ณ„์—ด์€ yum ์„ ์‚ฌ์šฉํ•˜๊ณ  ๋ ˆ๋“œํ–‡ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ํŽ˜๋„๋ผ CentOS ๋ฐ๋น„์•ˆ, ์šฐ๋ถ„ํˆฌ ๊ณ„์—ด์€ apt-get ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

[Linux] wget, curl ์ฐจ์ด
... 2021. 7. 30. 09:05

wget vs curl wget ๊ณผ curl ์€ ๋‘˜ ๋‹ค ์›น ์„œ๋ฒ„๋กœ๋ถ€ํ„ฐ ์ปจํ…์ธ ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” Linux ์ปค๋งจ๋“œ์ž…๋‹ˆ๋‹ค. wget ๊ณผ curl ์€ ๊ฑฐ์˜ ์œ ์‚ฌํ•˜์ง€๋งŒ ์กฐ๊ธˆ ๋‹ค๋ฅธ ๋ถ€๋ถ„์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ณตํ†ต์  HTTP, HTTPS, FTP ํ”„๋กœํ† ์ฝœ์„ ํ†ตํ•ด ์ปจํ…์ธ ๋ฅผ ๋‹ค์šด๋กœ๋“œ ํ•˜๋Š” ์ปค๋งจํŠธ ๋ผ์ธ ํˆด์ž…๋‹ˆ๋‹ค. HTTP POST request ๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. (์ฆ‰, ์›น์‚ฌ์ดํŠธ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†กํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.) HTTP ์ฟ ํ‚ค๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์Šคํฌ๋ฆฝํŠธ์ฒ˜๋Ÿผ ์‚ฌ์šฉ์ž ์ธํ„ฐ๋ ‰์…˜์—†์ด ์ˆ˜ํ–‰๋  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์˜คํ”ˆ์†Œ์Šค์ด๋ฉฐ ๋ฌด๋ฃŒ์ž…๋‹ˆ๋‹ค. 90๋…„๋Œ€์— ์‹œ์ž‘ํ•œ ํ”„๋กœ์ ํŠธ์ž…๋‹ˆ๋‹ค. (wget ์€ 1995๋…„, curl ์€ 1996๋…„์— ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค.) metalink ๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ฐจ์ด์  wget ๊ฐ„๋‹จํ•˜๊ณ  ์ง๊ด€์ ์ž…๋‹ˆ๋‹ค. ๋ณ„๋„์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค...

article thumbnail
[Spring] ํŠธ๋žœ์žญ์…˜์˜ propagation ์„ค์ •๋ณ„ ๋™์ž‘
... 2021. 6. 23. 15:40

์ด ๊ธ€์€ DevEric ๋‹˜์˜ ๊ธ€์„ ์ฐธ๊ณ ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ํŠธ๋žœ์žญ์…˜์˜ propagation ์„ค์ •์ด๋ž€ Spring์—์„œ ์‚ฌ์šฉํ•˜๋Š” ์–ด๋…ธํ…Œ์ด์…˜ '@Transactional'์€ ํ•ด๋‹น ๋ฉ”์„œ๋“œ๋ฅผ ํ•˜๋‚˜์˜ ํŠธ๋žœ์žญ์…˜ ์•ˆ์—์„œ ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด์ฃผ๋Š” ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ํŠธ๋žœ์žญ์…˜ ๋‚ด๋ถ€์—์„œ ํŠธ๋žœ์žญ์…˜์„ ๋˜ ํ˜ธ์ถœํ•œ๋‹ค๋ฉด ์Šคํ”„๋ง์—์„œ๋Š” ์–ด๋–ป๊ฒŒ ์ฒ˜๋ฆฌํ•˜๊ณ  ์žˆ์„๊นŒ์š”? ์ƒˆ๋กœ์šด ํŠธ๋žœ์žญ์…˜์ด ์ƒ์„ฑ๋  ์ˆ˜๋„ ์žˆ๊ณ , ์ด๋ฏธ ํŠธ๋žœ์žญ์…˜์ด ์žˆ๋‹ค๋ฉด ๋ถ€๋ชจ ํŠธ๋žœ์žญ์…˜์— ํ•ฉ๋ฅ˜ํ•  ์ˆ˜๋„ ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ง„ํ–‰๋˜๊ณ  ์žˆ๋Š” ํŠธ๋žœ์žญ์…˜์—์„œ ๋‹ค๋ฅธ ํŠธ๋žœ์žญ์…˜์ด ํ˜ธ์ถœ๋  ๋•Œ ์–ด๋–ป๊ฒŒ ์ฒ˜๋ฆฌํ• ์ง€ ์ •ํ•˜๋Š” ๊ฒƒ์„ 'ํŠธ๋žœ์žญ์…˜์˜ ์ „ํŒŒ ์„ค์ •'์ด๋ผ๊ณ  ๋ถ€๋ฆ…๋‹ˆ๋‹ค. ์ „ํŒŒ ์„ค์ • ์˜ต์…˜ ํŠธ๋žœ์žญ์…˜์˜ ์ „ํŒŒ ์„ค์ •์€ '@Transactional'์˜ ์˜ต์…˜ 'propagation'์„ ํ†ตํ•ด ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ์˜ต์…˜์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ..

article thumbnail
[Java] try ~ catch๋ฌธ์„ ์ด์šฉํ•˜์—ฌ ์˜ˆ์™ธ์ฒ˜๋ฆฌ ํ•˜๊ธฐ
... 2021. 6. 22. 09:51

Sims๋‹˜์˜ ๊ธ€์„ ์ฐธ๊ณ ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•˜๋‹ค ๋ณด๋ฉด ๋‹ค์–‘ํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๊ธฐ ์‰ฝ์Šต๋‹ˆ๋‹ค. ๊ฐ€์žฅ ๋Œ€ํ‘œ์ ์ธ ์˜ˆ๋กœ๋Š” file์„ ์ฝ์œผ๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ํ•ด๋‹น file์ด ์—†๋Š” ๊ฒฝ์šฐ, 0์œผ๋กœ ๋‚˜๋ˆ„๋Š” ๊ฒฝ์šฐ ๋“ฑ๋“ฑ.. ์‰ฝ๊ฒŒ ์ ‘ํ•  ์ˆ˜ ์žˆ๋Š” ์˜ค๋ฅ˜๋“ค์ด ๋งŽ์ด ์žˆ์ฃ . ์ด๋Ÿฌํ•œ ์˜ค๋ฅ˜๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ์„ '์˜ˆ์™ธ ์ฒ˜๋ฆฌ'๋ผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿผ ์–ด๋–ป๊ฒŒ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ๋ฅผ ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์‚ดํŽด๋ณด๋„๋ก ํ•ฉ์‹œ๋‹ค. ์˜ˆ์™ธ์ฒ˜๋ฆฌ != ๋ฒ„๊ทธ ์ž, ์ผ๋‹จ ์˜ค๋ฅ˜๋ฅผ ๋ถ„๋ฅ˜ํ•ด ๋ด…์‹œ๋‹ค. ์œ„์—์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ 2๊ฐ€์ง€ ์˜ค๋ฅ˜๋ฅผ ๋ง์”€๋“œ๋ ธ์Šต๋‹ˆ๋‹ค. ์ฒซ ๋ฒˆ์งธ๋Š” ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ, ๋‘ ๋ฒˆ์งธ๋Š” 0์œผ๋กœ ๋‚˜๋ˆ„์—ˆ์„ ๋•Œ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค. ๋‘˜ ๋‹ค ์˜ค๋ฅ˜์ง€๋งŒ ์ž์„ธํžˆ ์‚ดํŽด๋ณด๋ฉด ํŠน์ง•์ด ์กฐ๊ธˆ ๋‹ค๋ฆ…๋‹ˆ๋‹ค. ์ฒซ ๋ฒˆ์งธ, ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ์˜ ์˜ค๋ฅ˜๋Š” ํ”„๋กœ๊ทธ๋ž˜๋จธ๊ฐ€ ์˜ˆ์ƒ์„ ํ•˜๊ณ  ์˜ˆ์™ธ ์ฒ˜๋ฆฌ๋ฅผ ํ•ด์ค˜์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. ์ฆ‰, ..

article thumbnail
[JSP] <c:forEach> varStatus ํ™œ์šฉ๋ฒ•
... 2021. 6. 10. 14:12

// ๋ฐ˜๋ณตํ•ด์„œ ํ‘œ์‹œํ•  ๋‚ด์šฉ ํ˜น์€ ๋ฐ˜๋ณตํ•  ๊ตฌ๋ฌธ ์ด ๋•Œ, ์ƒํƒœ์šฉ ๋ณ€์ˆ˜๋ฅผ status๋ผ๊ณ  ์ง€์ •ํ–ˆ๋‹ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ${status.current} ํ˜„์žฌ for๋ฌธ์˜ ํ•ด๋‹นํ•˜๋Š” ๋ฒˆํ˜ธ ${status.index} 0๋ถ€ํ„ฐ์˜ ์ˆœ์„œ ${status.count} 1๋ถ€ํ„ฐ์˜ ์ˆœ์„œ ${status.first} ์ฒซ ๋ฒˆ์งธ์ธ์ง€ ์—ฌ๋ถ€ ${status.last} ๋งˆ์ง€๋ง‰์ธ์ง€ ์—ฌ๋ถ€ ${status.begin} for๋ฌธ์˜ ์‹œ์ž‘ ๋ฒˆํ˜ธ ${status.end} for๋ฌธ์˜ ๋ ๋ฒˆํ˜ธ ${status.step} for๋ฌธ์˜ ์ฆ๊ฐ€๊ฐ’ ํ™œ์šฉ ์˜ˆ / ์ฝ์–ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

profile on loading

Loading...