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

[EC2] Ubuntu ์˜ค๋ผํด 11g XE ์„ค์น˜ํ•˜๊ธฐ (+ํ™˜๊ฒฝ๋ณ€์ˆ˜)

by yunamom 2022. 11. 27.
๋ฐ˜์‘ํ˜•

1. Ubuntu ์˜ค๋ผํด ์„ค์น˜ํ•˜๊ธฐ

*์„ค์น˜์ „์— EC2 ์„œ๋ฒ„ ์Šค์™‘ ์˜์—ญ ๋งŒ๋“ค๊ธฐ (๋งํฌ)

Oracle ๋‹ค์šด๋กœ๋“œ

#๋กœ์ปฌ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

 

[Oracle] ์šฐ๋ถ„ํˆฌ20.04 oracle 11gR2 ์„ค์น˜

์˜ค๋ผํด 11gR2๋ฅผ ์„ค์น˜ํ•˜๊ธฐ์ „ 18c๋‚˜ 19c๋ฅผ ์„ค์น˜ํ•˜๋ ค๊ณ ํ–ˆ๋‹ค. ์šฐ๋ถ„ํˆฌ๋Š” 11g,12g๊นŒ์ง€๋ฐ–์— ํ˜ธํ™˜๋˜์ง€ ์•Š๋Š”๋‹ค๊ณ  ํ•ด 11g๋ฅผ ์„ ํƒํ–ˆ๋‹ค. 1. ์˜ค๋ผํด ๋‹ค์šด๋กœ๋“œ www.oracle.com/database/technologies/xe-prior-releases.html ๋ฆฌ๋ˆ…์Šค ๋ฒ„

bantree.tistory.com

์ฐธ๊ณ 2 : https://thinmug.tistory.com/21

 

[๋ฆฌ๋ˆ…์Šค] ์˜ค๋ผํด Oracle 11g XE ์„ค์น˜

CentOS7์— ์˜ค๋ผํด 11g XE๋ฅผ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ•œ๋‹ค. ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ๋งŽ์ด ์ฐจ์ง€ํ•˜๊ณ  ํŠนํžˆ swap์šฉ๋Ÿ‰(๊ฐ€์ƒ๋ฉ”๋ชจ๋ฆฌ)์ด ์ถฉ๋ถ„ํ•ด์•ผํ•œ๋‹ค.(5g์ด์ƒ) http://www.oracle.com> Download> Database > Database 11g Express Edition ๋จผ์ € VMware์—์„œ CentOS7

thinmug.tistory.com

 

300x250

์ฝ”๋“œ