๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

์„œ๋ฒ„/AWS12

[AWS] EC2 persistent instance retirement scheduled ํ•ด๊ฒฐ ๋ณต๊ตฌํ•  ์ˆ˜ ์—†๋Š” ์žฅ์• ๋ฅผ ๊ฐ์ง€ํ•˜๋ฉด EC2 ์ธ์Šคํ„ด์Šค๊ฐ€ ์‚ฌ์šฉ ์ค‘์ง€๋˜๋„๋ก ์˜ˆ์•ฝ๋ฉ๋‹ˆ๋‹ค. ๋ผ๊ณ  ์ด๋ฉ”์ผ์ด ๋˜์™”๋‹ค..!! ๋‘๋ฒˆ์งธ ๊ฒฝํ—˜ํ•˜๋Š” ์ผ์ด๋ผ์„œ ๊ทธ๋Ÿฐ์ง€ ์ด์ œ ๊ทธ๋Ÿฌ๋ ค๋‹ˆํ•œ๋‹ค..๋ฌด๋ฃŒ ์ธ์Šคํ„ด์Šค๋‹ˆ๊นŒ ์ด๋Ÿฐ๊ฑด๊ฐ€?! ํ™˜๊ฒฝ : EC2 Ubuntu, tomcat9, Nginx, Oracle 11g XE Instance state -> Stop instance ํด๋ฆญ (์™„์ „ํžˆ Stopped ๋ ๋•Œ๊นŒ์ง€ 5๋ถ„ ~10๋ถ„ ์ •๋„ ์†Œ์š”๋จ) -> Start instance ํด๋ฆญ ์„œ๋ฒ„ ์ ‘์†ํ›„ ํ†ฐ์บฃ & Nginx ์žฌ์‹œ์ž‘ $ sudo service tomcat9 start $ sudo service nginx start ์˜ค๋ผํด ๊ธฐ๋™ $ su - oracle $ sqlplus /nolog SQL > conn /as sysdba SQL > startup; OR.. 2022. 4. 21.
[error] EC2 ์„œ๋ฒ„ ์žฌ๋ถ€ํŒ…ํ›„ ๋ฐ์ดํ„ฐ ์—ฐ๋™์—๋Ÿฌ ํ•ด๊ฒฐํ•˜๊ธฐ EC2 ์„œ๋ฒ„๋ฅผ ์žฌ์‹œ์ž‘ํ›„์— ์˜ค๋ผํดDB ์™€ ์—ฐ๋™์ด ๋˜์ง€์•Š์•„์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค. The server encountered an unexpected condition that prevented it from fulfilling the request. ์—๋Ÿฌ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• ๐Ÿ‘‡๋ฆฌ์Šค๋„ˆ ๊ด€๋ฆฌ ์ ‘์† $lsnrctl ๐Ÿ‘‡๋ฆฌ์Šค๋„ˆ ์‹œ์ž‘ $start ํ•ด๊ฒฐ ์™„๋ฃŒ! ๐Ÿ˜† ๋ฆฌ์Šค๋„ˆ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ธฐ [Oracle] ๋ฆฌ์Šค๋„ˆ(Listener) ๋ž€? ์•ˆ๋…•ํ•˜์„ธ์š” yunamom ์ž…๋‹ˆ๋‹ค :D ์˜ค๋Š˜์€ ์˜ค๋ผํด ๋ฆฌ์Šค๋„ˆ์— ๊ด€ํ•˜์—ฌ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.๐Ÿ˜Š ๋ฆฌ์Šค๋„ˆ(Listener) ๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š”? ์˜ค๋ผํด ๋ฆฌ์Šค๋„ˆ๋Š” ๋„คํŠธ์›Œํฌ๋ฅผ ์ด์šฉํ•˜์—ฌ ํด๋ผ์ด์–ธํŠธ์—์„œ ์˜ค๋ผํด ์„œ๋ฒ„๋กœ ์—ฐ๊ฒฐํ•˜๊ธฐ yunamom.tistory.com 2022. 3. 31.
[AWS] ๋ณต๊ตฌํ• ์ˆ˜์—†๋Š” ์žฅ์•  - Amazon EC2 Instance Retirement ํŒ€ํ”„๋กœ์ ํŠธ ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ๋‹ค ๊ฐ„๋žตํ•œ ์„ค๋ช… Amazon Web Services(AWS)๊ฐ€ ์ธ์Šคํ„ด์Šค๋ฅผ ํ˜ธ์ŠคํŒ…ํ•˜๋Š” ์ธํ”„๋ผ์—์„œ ๋ณต๊ตฌํ•  ์ˆ˜ ์—†๋Š” ์žฅ์• ๋ฅผ ๊ฐ์ง€ํ•˜๋ฉด EC2 ์ธ์Šคํ„ด์Šค๊ฐ€ ์‚ฌ์šฉ ์ค‘์ง€๋˜๋„๋ก ์˜ˆ์•ฝ๋ฉ๋‹ˆ๋‹ค. ๋งŒ๋ฃŒ ์˜ˆ์•ฝ์œผ๋กœ ์ด์–ด์งˆ ์ˆ˜ ์žˆ๋Š” ๋ฌธ์ œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋ณต๊ตฌํ•  ์ˆ˜ ์—†๊ณ  ์†Œํ”„ํŠธ์›จ์–ด ๊ต์ฒด๊ฐ€ ํ•„์š”ํ•œ ์†Œํ”„ํŠธ์›จ์–ด ๊ด€๋ จ ๋ฌธ์ œ. ๋ถˆ๋Ÿ‰ ์ „์› ๊ณต๊ธ‰ ์žฅ์น˜, ํ•˜๋“œ ๋””์Šคํฌ ๋˜๋Š” ๊ธฐํƒ€ ์„œ๋ฒ„ ๊ตฌ์„ฑ ์š”์†Œ์™€ ๊ฐ™์ด ๊ต์ฒด๊ฐ€ ํ•„์š”ํ•œ ํ•˜๋“œ์›จ์–ด ์žฅ์• . ์ž์„ธํ•œ์„ค๋ช… ์œ„์™€ ๊ฐ™์€ ์ด์œ ๋กœ ์ธ์Šคํ„ด์Šค๋ฅผ ์ค‘์ง€ -> ์‹œ์ž‘ ํ•˜๊ธฐ๋กœ ๊ฒฐ์ •ํ•˜์˜€๋‹ค. (์„œ๋ฒ„์— ์ ‘์†์ด ์•„์˜ˆ ๋˜์ง€์•Š๋Š” ์ƒํƒœ์˜€์Œ ใ… ใ… ) ์ธ์Šคํ„ด์Šค ์ƒํƒœ์— ๋งˆ์šฐ์Šค ์˜ค๋ฅธ์ชฝ ํด๋ฆญํ›„ ์ธ์Šคํ„ด์Šค ์ค‘์ง€ ํด๋ฆญ ( ์ข…๋ฃŒ ์•„๋‹˜ ! ์ข…๋ฃŒํด๋ฆญํ•˜๋ฉด ์ธ์Šคํ„ด์Šค ํŒŒ๊ดด๋จ..์—†์–ด์ง) ์ค‘์ง€ํ›„ 5๋ถ„ ~ 10๋ถ„ ์ •๋„ ๋’ค์— ์™„์ „ํžˆ ์ค‘์ง€๋จ ์ด๋ผ๊ณ .. 2022. 3. 30.
AWS EC2 root ๋ณผ๋ฅจ์šฉ๋Ÿ‰ ๋Š˜๋ฆฌ๊ธฐ ์•ˆ๋…•ํ•˜์„ธ์š” yunamom ์ž…๋‹ˆ๋‹ค :D AWS EC2 root ๋ณผ๋ฅจ์šฉ๋Ÿ‰ ๋Š˜๋ฆฌ๋Š” ๋ฐฉ๋ฒ•์„ ํฌ์ŠคํŒ… ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Step 1. ๋จผ์ € AWS ๋กœ๊ทธ์ธํ›„ EC2 Dashboard ๋ฅผ ํด๋ฆญ -> Volumes ํด๋ฆญ Step 2. Modify ์ˆ˜์ •์„ ํด๋ฆญ ! Step 3. (๋ฌด๋ฃŒ)์•ˆ์ „ํ•˜๊ฒŒ 8gb ์—์„œ -> 16gb ๋กœ ์šฉ๋Ÿ‰์„ ๋Š˜๋ ค์ค€๋’ค -> Modify ๋ฒ„ํŠผ ํด๋ฆญ Step 4. ์„œ๋ฒ„์— ์ ‘์†ํ•ด์„œ ์ˆ˜์ •์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ•ด์ค๋‹ˆ๋‹ค. $ lsblk $ sudo growpart /dev/xvda 1 $ lsblk $ sudo resize2fs /dev/xvda1 df -h 2022. 3. 22.
Nginx ํ†ฐ์บฃ ์—ฐ๋™ 80 ํฌํŠธ(Nginx)๋กœ ์š”์ฒญ์ด ์™”์„๋•Œ 8080 ํฌํŠธ(tomcat) ์œผ๋กœ ์—ฐ๊ฒฐ์‹œํ‚ค๋Š” ์„ค์ • $ sudo vi /etc/nginx/sites-enabled/default //location ์— ์„ค์ •์ถ”๊ฐ€์ž‘์„ฑ location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404; proxy_pass http://localhost:8080; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set.. 2022. 2. 10.
EC2 nginx ์„ค์น˜ ๋ฐ ํ†ฐ์บฃ์—ฐ๋™ http -> https ๋กœ ๋ณ€๊ฒฝํ•˜๊ธฐ์œ„ํ•œ ๊ณผ์ •์„ ์Šค์Šค๋กœ ๊ธฐ์–ตํ•˜๊ธฐ์œ„ํ•ด ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. *๋ณธ๊ธ€์—๋Š” AWS ๊ฐ€์ž… ๋ฐ ec2 ์„ค์ • ํ†ฐ์บฃ ์„ค์น˜ ํ†ฐ์บฃ ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๋Š” ์ƒ๋žตํ•ฉ๋‹ˆ๋‹ค. $sudo apt-get --purge remove nginx-* ๊ธฐ์กด์— ์„ค์น˜ํ–ˆ๋˜ nginx ๋ฅผ ์‚ญ์ œํ•ด์ฃผ์—ˆ๋‹ค. $sudo apt install nginxโ€‹ nginx ๋‹ค์‹œ์„ค์น˜ Do you want to countinue? [Y/n] y ์„ค์น˜ ์™„๋ฃŒํ›„ $cd /etc/nginx/sites-available sites-available ํด๋”๋กœ ์ด๋™ $sudo touch tomcat.conf tomcat.conf ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด์ค€๋‹ค. $sudo vi tomcat.conf tomcat.conf ํŒŒ์ผ์„ ์—ด์–ด ์ž‘์„ฑํ•ด์ฃผ์ž ์„œ๋ฒ„์— ์ ‘์†ํ• ๋•Œ ์‚ฌ์šฉํ•œ public ip.. 2022. 1. 26.
300x250

์ฝ”๋“œ