๋ฐ์ํ
1. Ubuntu ์ค๋ผํด ์ค์นํ๊ธฐ
*์ค์น์ ์ EC2 ์๋ฒ ์ค์ ์์ญ ๋ง๋ค๊ธฐ (๋งํฌ)
#๋ก์ปฌPC ํ์ผ์ ubuntu ์๋ฒ๋ก ์
๋ก๋ ํ๊ธฐ
~$ scp -i ํคํ์ผ.pem ์
๋ก๋ํ์ผ ubuntu@IP์ฃผ์:~
gen_inst.sql 100% 10KB 59.4KB/s 00:00
.DS_Store 100% 6148 65.1KB/s 00:00
xe.rsp 100% 2748 27.0KB/s 00:00
oracle-xe-11.2.0-1.0.x86_64.rpm 100% 303MB 497.6KB/s 10:22
EC2 ์๋ฒ์ ssh ์ฐ๊ฒฐํ rpm -> deb ๋ณํํ๊ธฐ
#์๋ฒ ์ ์ํ๊ธฐ
ubuntu:~$ ssh -i [ํคํ์ผ์ด๋ฆ].pem ubuntu@[์ธ์คํด์ค ํ๋ ฅIP]
#ํจํค์ง ์
๋ฐ์ดํธ
ubuntu:~$ sudo apt update
ubuntu:~$ sudo apt upgrade
#ํ์ผ๋ณํ์ ์ํ alien ์ค์น
ubuntu:~$ sudo apt -y install alien libaio1 unixodbc
#์
๋ก๋ ํด๋๋ก ์ด๋ํ ๋ณํ (.rpm -> .deb)
ubuntu:~$ cd Disk1
ubuntu:~/Disk1$ ls
oracle-xe-11.2.0-1.0.x86_64.rpm response upgrade
ubuntu:~/Disk1$ sudo alien --scripts -d oracle*
oracle-xe_11.2.0-2_amd64.deb generated
deb ๋ก ๋ณํ๋ ํ์ผ ์ค์นํ๊ธฐ
ubuntu:~$ sudo dpkg --install oracle*.deb
ubuntu:~$ sudo /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press <Enter> to accept the defaults.
Ctrl-C will abort.
#ํฌํธ๋ฒํธ ์ค์ 8000์ผ๋ก ๋ฐ๊ฟ์ค๋ค. (์ถฉ๋๋ฐฉ์ง)
Specify the HTTP port that will be used for Oracle Application Express [8080]:8000
#๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ฆฌ์ค๋๋ฅผ ์ํ ํฌํธ๋ฅผ ์ง์ (๊ธฐ๋ณธ๊ฐ 1521)
Specify a port that will be used for the database listener [1521]:
#system ๊ณ์ ์ ๋น๋ฐ๋ฒํธ ์ค์ (๊ผญ ์ธ์ฐ์)
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
#์๋์ผ๋ก ์ค๋ผํด ์คํํ ๊ฒ์ธ์ง ์ ํ (๊ธฐ๋ณธ๊ฐ Y)
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
#์ค์น ์๋ฃ
2. ์ค๋ผํด ์ฌ์ฉํ๊ธฐ
ํ๊ฒฝ๋ณ์
ubuntu:~$ sudo vi ~/.bashrc
#์๋ ์ค์ ์ ๋ฃ์ด์ค๋ค.
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
ubuntu:~$ source ~/.bashrc
๋ฆฌ์ค๋ ์ํ ํ์ธํ๊ธฐ (successfully)
ubuntu:~$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 27-NOV-2022 00:49:30
Copyright (c) 1991, 2011, Oracle. All rights reserved.
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 27-NOV-2022 00:42:13
Uptime 0 days 0 hr. 7 min. 16 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/ip-172-31-12-203/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ip-172-31-12-203.ap-northeast-2.compute.internal)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ip-172-31-12-203.ap-northeast-2.compute.internal)(PORT=8000))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
์ค๋ผํด ์ ์ํ์ธ
#sqlplus๋ฅผ ์คํํ๊ณ user-name์ system, password์ ์๊น ์ค์ ํ ๋น๋ฐ๋ฒํธ๋ฅผ ์
๋ ฅ
ubuntu:~$ sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Sun Nov 27 00:55:59 2022
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter user-name: system
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL>
์๋ฃ!๐
์ฐธ๊ณ 1 : https://bantree.tistory.com/370
์ฐธ๊ณ 2 : https://thinmug.tistory.com/21
300x250
'์๋ฒ > AWS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[EC2] MySQL & Tomcat ์ค์น - Ubuntu (0) | 2022.11.26 |
---|---|
[AWS] ์๋ฒ ์ธ์คํด์ค ์ญ์ / Elastic IP ์ญ์ / ๊ณ์ ์ญ์ ํ๋๋ฐฉ๋ฒ (0) | 2022.11.18 |
[EC2] AWS ํ๋ฆฌํฐ์ด ์ฌ์ฉ๋ฒ Step2 - ์ฐ๋ถํฌ ์๋ฒ ์ด๊ธฐ์ค์ (0) | 2022.08.01 |
[EC2] AWS ํ๋ฆฌํฐ์ด ์ฌ์ฉ๋ฒ Step1 - ์ธ์คํด์ค/ํ๋ ฅ IP ์์ฑ (1) | 2022.08.01 |
[EC2] 101: network is unreachable - apt update ์๋ฌ ํด๊ฒฐ (0) | 2022.07.05 |