๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
์„œ๋ฒ„/AWS

[AWS] EC2 persistent instance retirement scheduled ํ•ด๊ฒฐ

by yunamom 2022. 4. 21.
728x90
300x250

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;
ORACLE instance started.

Total System Global Area  405020672 bytes
Fixed Size		    2226960 bytes
Variable Size		  301991152 bytes
Database Buffers	   96468992 bytes
Redo Buffers		    4333568 bytes
Database mounted.
Database opened.

๋ฐฉํ™”๋ฒฝ ์„ค์ • ํ™•์ธ

# ๋ฐฉํ™”๋ฒฝ ์„ค์ • ํ™•์ธ
$systemctl status firewalld

# ๋ฐฉํ™”๋ฒฝ ๋น„ํ™œ์„ฑํ™” ๋ฐ ์„ค์ •์œ ์ง€
$sudo systemctl stop firewalld 
$sudo systemctl mask firewalld

์˜ค๋ผํด ๋ฆฌ์Šค๋„ˆ ๊ด€๋ฆฌ ์ ‘์†

$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 21-4์›” -2022 14:18:52

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start
Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/green/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=green)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                21-4์›” -2022 14:18:59
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/green/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=green)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

 

728x90
300x250

์ฝ”๋“œ