๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
300x250

์„œ๋ฒ„23

[EC2] 101: network is unreachable - apt update ์—๋Ÿฌ ํ•ด๊ฒฐ AWS EC2 ์šฐ๋ถ„ํˆฌ ์„œ๋ฒ„์—๋Ÿฌ 101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค / 101: network is unreachable ubuntu@green:~$ sudo apt update ์˜ค๋ฅ˜:1 http://security.ubuntu.com/ubuntu focal-security InRelease security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2620:2d:4000:1::16). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2620:2d:4000:1::19). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (200.. 2022. 7. 5.
Problem binding to port 80: Could not bind to IPv4 or IPv6. ssl ์ธ์ฆ์„œ ๋ฐœ๊ธ‰ ๊ณผ์ •์—์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค. ํ•ด๊ฒฐ : 80๋ฒˆ ํฌํŠธ๋ฅผ ์ ์œ ํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ธฐ์กด ์›น ํ”„๋ ˆ์ž„์›Œํฌ๋‚˜ ํ˜น์€ ์„œ๋ฒ„ ํ”„๋กœ๊ทธ๋žจ์„ ์ข…๋ฃŒํ•˜๊ธฐ ubuntu:~$ sudo lsof -i :80 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nginx 1031 root 6u IPv4 25900 0t0 TCP *:http (LISTEN) nginx 1031 root 7u IPv6 25901 0t0 TCP *:http (LISTEN) nginx 1032 www-data 6u IPv4 25900 0t0 TCP *:http (LISTEN) nginx 1032 www-data 7u IPv6 25901 0t0 TCP *:http (LISTEN) ubuntu:~$ kill 1031 .. 2022. 7. 5.
[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.
[Linux] certbot 404 ์—๋Ÿฌ type: unauthorized ํ•ด๊ฒฐํ•˜๊ธฐ ์—๋Ÿฌํ•ด๊ฒฐ๊ณผ์ •์„ ์Šค์Šค๋กœ ๊ธฐ์–ตํ•˜๊ธฐ์œ„ํ•ด ํฌ์ŠคํŒ…ํ•ฉ๋‹ˆ๋‹ค. AWS ์„œ๋ฒ„ํ™˜๊ฒฝ : Ubuntu, Tomcat9, Nginx(ํ†ฐ์บฃ์—ฐ๋™) Tip: ํ„ฐ๋ฏธ๋„ ์ฐฝ 2๊ฐœ ์ผœ๋†“๊ณ  ์‹คํ–‰ํ•ด์•ผํ•จ. โœจ์ฒซ๋ฒˆ์งธ ํ„ฐ๋ฏธ๋„ (Ubuntu ์„œ๋ฒ„ ์ ‘์†ํ›„) certbot ์—๋Ÿฌ 404 ubuntu@:~$ sudo certbot --nginx -d yunamom.duckdns.org Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator nginx, Installer nginx Obtaining a new certificate Performing the following challenges: http-01 challenge for yunamom.duck.. 2022. 4. 19.
[Linux] certbot ๋ช…๋ น์œผ๋กœ ์ธ์ฆ์„œ ์‚ญ์ œํ•˜๋Š”๋ฐฉ๋ฒ• โ—‡ ์ธ์ฆ์„œ ๋ชฉ๋ก ํ™•์ธ ubuntu@:~$ sudo certbot certificates Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Found the following certs: Certificate Name: yunamom.duckdns.org Domains: yunamom.duckdns.org Expiry Date: 2022-04-17 23:33:36+00:00 (INVALID: EXPIRED) Certificate Path: /etc/letsencrypt/live/yunamom.duckdns.org/.. 2022. 4. 19.
[Linux] ๋ฆฌ๋ˆ…์Šค ๊ธฐ๋ณธ ๋ช…๋ น์–ด โ—‡ ํ•„์ˆ˜ ๋ช…๋ น์–ด๋“ค ์š”์•ฝ ls - ํ˜„์žฌ ์œ„์น˜์˜ ํŒŒ์ผ ๋ชฉ๋ก ์กฐํšŒ cd - ๋””๋ ‰ํ„ฐ๋ฆฌ ์ด๋™ touch - 0๋ฐ”์ดํŠธ ํŒŒ์ผ ์ƒ์„ฑ, ํŒŒ์ผ์˜ ๋‚ ์งœ์™€ ์‹œ๊ฐ„์„ ์ˆ˜์ • mkdir - ๋””๋ ‰ํ„ฐ๋ฆฌ ์ƒ์„ฑ cp - ํŒŒ์ผ ๋ณต์‚ฌ mv - ํŒŒ์ผ ์ด๋™ rm - ํŒŒ์ผ ์‚ญ์ œ cat - ํŒŒ์ผ์˜ ๋‚ด์šฉ์„ ํ™”๋ฉด์— ์ถœ๋ ฅ, ๋ฆฌ๋‹ค์ด๋ ‰์…˜ ๊ธฐํ˜ธ('>')๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ƒˆ๋กœ์šด ํŒŒ์ผ ์ƒ์„ฑ redirection - ํ™”๋ฉด์˜ ์ถœ๋ ฅ ๊ฒฐ๊ณผ๋ฅผ ํŒŒ์ผ๋กœ ์ €์žฅ alias - ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ๋ช…๋ น์–ด๋“ค์„ ๋ณ„๋ช…์œผ๋กœ ์ •์˜ํ•˜์—ฌ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค์ • โ—‡ ๋ช…๋ น์–ด ์˜ต์…˜๊ณผ ์„ค๋ช… 1. ls (List segments) : ํ˜„์žฌ ์œ„์น˜์˜ ํŒŒ์ผ ๋ชฉ๋ก ์กฐํšŒ ls -l : ํŒŒ์ผ์˜ ์ƒ์„ธ์ •๋ณด ls -a : ์ˆจ๊น€ ํŒŒ์ผ ํ‘œ์‹œ ls -t : ํŒŒ์ผ๋“ค์„ ์ƒ์„ฑ์‹œ๊ฐ„์ˆœ(์ œ์ผ ์ตœ์‹  ๊ฒƒ๋ถ€ํ„ฐ)์œผ๋กœ ํ‘œ์‹œ ls -rt : ํŒŒ์ผ๋“ค์„.. 2022. 4. 13.
[Linux] curl ๋ช…๋ น์–ด ์‚ฌ์šฉ๋ฒ• (http/https ๊ด€๋ จ) CURL ์ฃผ์š” ์˜ต์…˜ (http/https ๊ด€๋ จ) โœจcurl ๋ช…๋ น์–ด์˜ ์‚ฌ์šฉ๋ฒ• $ curl [options..] ํŠน์ • URL์„ ๋Œ€์ƒ์œผ๋กœ ๋™์ž‘ํ•˜๋ฉฐ URL ์•ž์—๋Š” curl์˜ ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค. curl ๋ช…๋ น์˜ ์˜ต์…˜์€ GNU getopt๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค. curl ๋ช…๋ น์˜ ์˜ต์…˜์€ ํ•˜์ดํ”ˆ ํ•˜๋‚˜๋กœ ์‹œ์ž‘ํ•˜๋Š” short ํ˜•์‹๊ณผ ํ•˜์ดํ”ˆ ๋‘๊ฐœ๋กœ ์‹œ์ž‘ํ•˜๋Š” long ํ˜•์‹์„ ๋ชจ๋‘ ์ง€์›ํ•œ๋‹ค. ๐Ÿ‘‡http, https ํ”„๋กœํ† ์ฝœ๊ณผ ๊ด€๋ จ๋œ curl์˜ ์˜ต์…˜ short long ์„ค๋ช… -k --insecure https ํ”„๋กœํ† ์ฝœ์—์„œ SSL ์ธ์ฆ์„œ์— ๋Œ€ํ•œ ๊ฒ€์ฆ์—†์ด ์—ฐ๊ฒฐ -l --head HTTP ํ—ค๋”๋งŒ ๋ณด์—ฌ์ฃผ๊ณ  ์ปจํ…์ธ ๋Š” ํ‘œ์‹œํ•˜์ง€ ์•Š์Œ -D --dump-header HTTP ํ—ค๋”๋ฅผ file์— ๊ธฐ๋ก (๋คํ”„) -L --location HTTP 30.. 2022. 4. 6.
[Linux] curl ์— ๋Œ€ํ•˜์—ฌ ์•Œ์•„๋ณด์ž โœจCURL ์ด๋ž€? curl ์˜ ๋ช…์นญ์€ "client URL" ์„ ๋Œ€ํ‘œํ•˜๋Š” ๊ฒƒ์œผ๋กœ 1997๋…„์— ์ฒ˜์Œ ์ถœ์‹œ๋˜์—ˆ๋‹ค. ์ฆ‰ ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์Šคํฌ๋ฆฝํŠธ๋กœ์จ ์„œ๋ฒ„์— ๋ฐ์ดํ„ฐ๋ฅผ ์š”์ฒญํ•˜๋Š”๊ฒƒ์„ ๋งํ•œ๋‹ค. URL์— ์ž„์˜์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†กํ•˜๊ธฐ(transferring) ์œ„ํ•˜์—ฌ ๋ช…๋ น ์ค„ ๋„๊ตฌ(command line tool)์™€ ์Šคํฌ๋ฆฝํŠธ(scripts)์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ œ๊ณตํ•˜๋Š” C ๊ธฐ๋ฐ˜์˜ ์ปดํ“จํ„ฐ ์†Œํ”„ํŠธ์›จ์–ด ํ”„๋กœ์ ํŠธ์ด๋‹ค. โœจCURL ์ด ๋ฌด์—‡์— ์“ฐ์ด๋‚˜์š”? curl์€ ๋‹ค์–‘ํ•œ ๊ณณ์—์„œ ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ž๋™์ฐจ, ํ…”๋ ˆ๋น„์ „, ๋ผ์šฐํ„ฐ, ํ”„๋ฆฐํ„ฐ, ์˜ค๋””์˜ค ์žฅ๋น„, ํœด๋Œ€ ์ „ํ™”, ํƒœ๋ธ”๋ฆฟ, ์…‹ํ†ฑ๋ฐ•์Šค, ๋ฏธ๋””์–ด ํ”Œ๋ ˆ์ด์–ด์—์„œ๋„ ์‚ฌ์šฉ๋˜๋ฉฐ, ๋งค์ผ ์ˆ˜์‹ญ์–ต ๋ช…์˜ ์‚ฌ๋žŒ๋“ค์—๊ฒŒ ์˜ํ–ฅ์„ ๋ฏธ์น˜๋Š” ์ˆ˜์ฒœ ๊ฐœ์˜ ์†Œํ”„ํŠธ์›จ์–ด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์œ„ํ•œ ์ธํ„ฐ๋„ท ์ „์†ก ํ”„๋กœํ† ์ฝœ์ž…๋‹ˆ๋‹ค. ๊ฐ€์žฅ.. 2022. 4. 6.
[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.
728x90
300x250

์ฝ”๋“œ