Search

AWS EC2 - SpringBoot ์‹คํ–‰ & ์ ‘์† (๋ฐฑ๊ทธ๋ผ์šด๋“œ ์‹คํ–‰)

AWS EC2 - ์ ‘์†

1.
์‚ฌ์ „ ์ค€๋น„ WAR ๋ฐฐํฌ
2.
java -jar app.war
3.
๋„๋ฉ”์ธ ์ ‘์†

์‚ฌ์ „ ์ค€๋น„ WAR ๋ฐฐํฌ

java -jar app.war

๋ฐฐํฌ ํŒŒ์ผ์ด ์žˆ๋Š” ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. (์˜ˆ์‹œ ๋ฐฐํฌํŒŒ์ผ๋ช… : app.war)
java -jar app.war
Bash
๋ณต์‚ฌ

๋ฐฑ๊ทธ๋ผ์šด๋“œ ์„œ๋ฒ„ ์‹คํ–‰

nohup java -jar app.war > app.out 2>&1 &
YAML
๋ณต์‚ฌ

๋„๋ฉ”์ธ ์ ‘์†

โ€ข
AWS > EC2 > ํผ๋ธ”๋ฆญ IPv4

๋ฐฑ๊ทธ๋ผ์šด๋“œ๋กœ ์‹คํ–‰ํ•œ ์„œ๋ฒ„ ์ข…๋ฃŒํ•˜๊ธฐ

ํ”„๋กœ์„ธ์Šค ์•„์ด๋”” PID ์กฐํšŒํ•˜๊ธฐ

sudo apt install net-tools
Bash
๋ณต์‚ฌ
sudo netstat -tulnp | grep :8080
Bash
๋ณต์‚ฌ

ํ”„๋กœ์„ธ์Šค ์ข…๋ฃŒํ•˜๊ธฐ

kill -9 [PID]
Bash
๋ณต์‚ฌ