OS 환경 : Oracle Linux 8.4 (64bit)
DB 환경 : Oracle Database 23.3.0.23.09 Free
방법 : Oracle Linux 8.4에 Oracle 23c Free RPM 설치 및 삭제 가이드
Oracle Linux 8.4에 23c Free 버전을 RPM 설치 방식을 통해 설치하는 방법과 삭제하는 방법을 설명함
23c 는 기본적으로 non-cdb 방식 사용이 불가능하고, cdb 방식으로만 설치가 가능함
OS 설치는 아래 게시물 참조
Oracle Linux 8.4 설치 가이드 ( https://positivemh.tistory.com/761 )
oracle 23c rpm 설치파일 다운로드
공식홈페이지 접속(https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#db_free)
설치파일 서버에 업로드
1
2
|
# ls -al oracle-database-free-23c-1.0-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 1751573448 Apr 27 00:56 oracle-database-free-23c-1.0-1.el8.x86_64.rpm
|
오라클 설치 전 사전 설정
/etc/hosts 에 ip hostname설정
1
2
3
4
|
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.23 oel8
|
preinstall rpm 설치
공식홈페이지에서 preinstall rpm 다운로드 후 서버에 업로드
또는 curl로 서버에 직접 다운로드
1
|
# curl -o oracle-database-preinstall-23c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/developer/x86_64/getPackage/oracle-database-preinstall-23c-1.0-1.el8.x86_64.rpm
|
preinstall 패키지 설치
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# dnf -y localinstall oracle-database-preinstall-23c-1.0-1.el8.x86_64.rpm
Last metadata expiration check: 0:02:56 ago on Sat 27 Apr 2024 12:55:05 AM KST.
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Installing:
oracle-database-preinstall-23c x86_64 1.0-1.el8 @commandline 30 k
Installing dependencies:
compat-openssl10 x86_64 1:1.0.2o-4.el8_6 ol8_appstream 1.1 M
ksh x86_64 20120801-259.0.1.el8 ol8_appstream 923 k
lm_sensors-libs x86_64 3.4.0-23.20180522git70f7e08.el8 ol8_baseos_latest 59 k
sysstat x86_64 11.7.3-11.0.1.el8 ol8_appstream 427 k
Transaction Summary
==============================================================================================================================================================================================================
Install 5 Packages
Total size: 2.5 M
Total download size: 2.5 M
Installed size: 7.7 M
Downloading Packages:
(1/4): lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm 58 kB/s | 59 kB 00:01
(2/4): ksh-20120801-259.0.1.el8.x86_64.rpm 537 kB/s | 923 kB 00:01
(3/4): sysstat-11.7.3-11.0.1.el8.x86_64.rpm 569 kB/s | 427 kB 00:00
(4/4): compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm 596 kB/s | 1.1 MB 00:01
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.3 MB/s | 2.5 MB 00:01
warning: /var/cache/dnf/ol8_baseos_latest-e4c6155830ad002c/packages/lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
Oracle Linux 8 BaseOS Latest (x86_64) 1.5 MB/s | 3.1 kB 00:00
Importing GPG key 0xAD986DA3:
Userid : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
Fingerprint: 76FD 3DB1 3AB6 7410 B89D B10E 8256 2EA9 AD98 6DA3
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : ksh-20120801-259.0.1.el8.x86_64 1/5
Running scriptlet: ksh-20120801-259.0.1.el8.x86_64 1/5
Installing : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 2/5
Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64 2/5
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Installing : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 3/5
Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 3/5
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Installing : sysstat-11.7.3-11.0.1.el8.x86_64 4/5
Running scriptlet: sysstat-11.7.3-11.0.1.el8.x86_64 4/5
Installing : oracle-database-preinstall-23c-1.0-1.el8.x86_64 5/5
Running scriptlet: oracle-database-preinstall-23c-1.0-1.el8.x86_64 5/5
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Verifying : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 1/5
Verifying : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 2/5
Verifying : ksh-20120801-259.0.1.el8.x86_64 3/5
Verifying : sysstat-11.7.3-11.0.1.el8.x86_64 4/5
Verifying : oracle-database-preinstall-23c-1.0-1.el8.x86_64 5/5
Installed:
compat-openssl10-1:1.0.2o-4.el8_6.x86_64 ksh-20120801-259.0.1.el8.x86_64 lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 oracle-database-preinstall-23c-1.0-1.el8.x86_64
sysstat-11.7.3-11.0.1.el8.x86_64
Complete!
|
자동 설정 후 수동설정 파일 확인필요
자동 설정 시 필수 rpm 설치 및 커널 파라미터가 설정되고 유저 및 그룹이 만들어짐
커널 파라미터 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# cat /etc/sysctl.conf
결과 # sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
# oracle-database-preinstall-23c setting for fs.file-max is 6815744
fs.file-max = 6815744
# oracle-database-preinstall-23c setting for kernel.sem is '250 32000 100 128'
kernel.sem = 250 32000 100 128
# oracle-database-preinstall-23c setting for kernel.shmmni is 4096
kernel.shmmni = 4096
# oracle-database-preinstall-23c setting for kernel.shmall is 1073741824 on x86_64
kernel.shmall = 1073741824
# oracle-database-preinstall-23c setting for kernel.shmmax is 4398046511104 on x86_64
kernel.shmmax = 4398046511104
# oracle-database-preinstall-23c setting for kernel.panic_on_oops is 1 per Orabug 19212317
kernel.panic_on_oops = 1
# oracle-database-preinstall-23c setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
# oracle-database-preinstall-23c setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304
# oracle-database-preinstall-23c setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144
# oracle-database-preinstall-23c setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576
# oracle-database-preinstall-23c setting for net.ipv4.conf.all.rp_filter is 2
net.ipv4.conf.all.rp_filter = 2
# oracle-database-preinstall-23c setting for net.ipv4.conf.default.rp_filter is 2
net.ipv4.conf.default.rp_filter = 2
# oracle-database-preinstall-23c setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576
# oracle-database-preinstall-23c setting for net.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500
# oracle-database-preinstall-23c setting special parameters BEGIN
# oracle-database-preinstall-23c setting for kernel.panic is 10
kernel.panic = 10
# oracle-database-preinstall-23c setting special parameters END
|
*kernel.shmall, kernel.shmmax 은 서버에 물리 메모리의 절반으로 설정 필요(byte 단위)
현재 서버의 물리 메모리를 8gb로 잡았기 때문에 절반인 4gb를 byte로 변경해 적용함(4*1024*1024*1024)
두 커널값 변경 후 적용
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 4294967296
kernel.shmmax = 4294967296
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
kernel.panic = 10
|
유저 및 그룹 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
|
유저
# tail -1 /etc/passwd
oracle:x:54321:54321::/home/oracle:/bin/bash
그룹
# tail -7 /etc/group
oinstall:x:54321:oracle
dba:x:54322:oracle
oper:x:54323:oracle
backupdba:x:54324:oracle
dgdba:x:54325:oracle
kmdba:x:54326:oracle
racdba:x:54330:oracle
|
selinux disable 설정
1
2
|
# vi /etc/selinux/config
SELINUX=disabled
|
불필요한 서비스 정지
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#
systemctl stop firewalld
systemctl disable firewalld
systemctl stop bluetooth
systemctl disable bluetooth
systemctl stop chronyd
systemctl disable chronyd
mv /etc/chrony.conf /etc/chrony.conf.bak
systemctl stop ntpdate
systemctl disable ntpdate
systemctl stop avahi-daemon.socket
systemctl disable avahi-daemon.socket
systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl stop libvirtd
systemctl disable libvirtd
|
oracle 유저 패스워드 설정
1
2
3
4
5
6
|
# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
|
Oracle Software 설치
oracle rpm 설치(root 계정)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# dnf -y localinstall oracle-database-free-23c-1.0-1.el8.x86_64.rpm
Last metadata expiration check: 0:20:07 ago on Sat 27 Apr 2024 12:55:05 AM KST.
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Installing:
oracle-database-free-23c x86_64 1.0-1 @commandline 1.6 G
Transaction Summary
==============================================================================================================================================================================================================
Install 1 Package
Total size: 1.6 G
Installed size: 4.0 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-free-23c-1.0-1.x86_64 1/1
Installing : oracle-database-free-23c-1.0-1.x86_64 1/1
Running scriptlet: oracle-database-free-23c-1.0-1.x86_64 1/1
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure Oracle Database Free, optionally modify the parameters in '/etc/sysconfig/oracle-free-23c.conf' and then run '/etc/init.d/oracle-free-23c configure' as root.
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Verifying : oracle-database-free-23c-1.0-1.x86_64 1/1
Installed:
oracle-database-free-23c-1.0-1.x86_64
Complete!
|
db 엔진이 설치 완료됨
설치 기본값이 /opt/oracle/oradata 여서 다른 경로로 변경
폴더 생성
1
2
3
|
# mkdir -p /app/oracle/oradata
# chown -R oracle:dba /app
# chmod -R 755 /app/
|
설치 파라미터 파일 변경
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# vi /etc/sysconfig/oracle-free-23c.conf
#This is a configuration file to setup the Oracle Database.
#It is used when running '/etc/init.d/oracle-free-23c configure'.
# LISTENER PORT used Database listener, Leave empty for automatic port assignment
LISTENER_PORT=
# Character set of the database
CHARSET=AL32UTF8
# Database file directory
# If not specified, database files are stored under Oracle base/oradata
DBFILE_DEST=/app/oracle/oradata
# DB Domain name
DB_DOMAIN=
# SKIP Validations, memory, space
SKIP_VALIDATIONS=false
|
다른부분은 그대로 두고 DBFILE_DEST만 수정함
Oracle DB 생성 및 구성
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# /etc/init.d/oracle-free-23c configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length,
contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
<-- SYS,SYSTEM, PDBADMIN 패스워드 입력
Confirm the password: <-- SYS,SYSTEM, PDBADMIN 패스워드 재입력
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password:
*********
Enter SYSTEM user password:
*******
Enter PDBADMIN User Password:
*******
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.
Connect to Oracle Database using one of the connect strings:
Pluggable database: oel8/FREEPDB1
Multitenant container database: oel8
|
db 구성 완료됨
db 구성 시 alert log 모니터링 하고 싶은 경우 확인
1
|
$ tail -300f /opt/oracle/diag/rdbms/free/FREE/trace/alert_FREE.log
|
설치 경로 확인
1
2
3
4
5
6
7
8
9
10
|
# ls -al /opt/oracle/
total 4
drwxr-xr-x. 8 oracle oinstall 98 Apr 27 01:33 .
drwxr-xr-x. 4 root root 36 Apr 27 01:22 ..
drwxr-x---. 3 oracle oinstall 18 Apr 27 01:33 admin
drwxr-x---. 3 oracle oinstall 18 Apr 27 01:33 audit
drwxr-xr-x. 4 oracle oinstall 31 Apr 27 01:32 cfgtoollogs
drwxrwxr-x. 25 oracle oinstall 4096 Apr 27 01:22 diag
drwxrwx---. 4 oracle oinstall 78 Apr 27 01:36 oraInventory
drwxr-xr-x. 3 oracle oinstall 17 Apr 27 01:16 product
|
/opt/oracle이 일반적으로 오라클 설치 후 보이는 $ORACLE_BASE가 됨
오라클, 리스너 프로세스 확인
1
2
3
4
5
6
7
8
9
10
|
db
# ps -ef | grep pmon
oracle 45272 1 0 01:36 ? 00:00:00 db_pmon_FREE
root 46061 45964 0 01:39 pts/2 00:00:00 grep --color=auto pmon
리스너
# ps -ef | grep tns
root 37 2 0 00:37 ? 00:00:00 [netns]
oracle 43739 1 0 01:32 ? 00:00:00 /opt/oracle/product/23c/dbhomeFree/bin/tnslsnr LISTENER -inherit
root 46063 45964 0 01:39 pts/2 00:00:00 grep --color=auto tns
|
oracle 계정 .bash_profile 설정
1
2
3
4
5
6
7
8
9
|
# su - oracle
$ vi .bash_profile
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/23c/dbhomeFree/
export ORACLE_SID=FREE
export PATH=$PATH:$ORACLE_HOME/bin
alias ss='sqlplus / as sysdba'
alias sysc='sqlplus sys/oracle@localhost:1521/FREE as sysdba'
alias sysp='sqlplus sys/oracle@localhost:1521/FREEPDB1 as sysdba'
|
적용
1
|
$ . ./.bash_profile
|
sqlplus 접속 및 버전 확인(기존 방식으로 cdb 접속)
*참고 이유는 모르겠지만 처음 설치 이후 아래 명령어로 접속시 ORA-12547: TNS:lost contact 발생하고
cdb 재기동 이후부터 이 방식으로 접속됨
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$ sqlplus / as sysdba
SQL*Plus: Release 23.0.0.0.0 - Production on Sat Apr 27 01:37:30 2024
Version 23.3.0.23.09
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> select instance_name, version, status from v$instance;
INSTANCE_NAME VERSION STATUS
---------------- ----------------- ------------
FREE 23.0.0.0.0 OPEN
|
정상적으로 CDB 접속됨
sqlplus 접속 테스트(리스너 이용 cdb접속)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
예시
[username]/[password]@[hostname]:[port]/[DB service name] [as sysdba]
CDB 접속
$ sqlplus sys/oracle@localhost:1521/FREE as sysdba
SQL*Plus: Release 23.0.0.0.0 - Production on Sat Apr 27 01:38:26 2024
Version 23.3.0.23.09
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
|
정상적으로 CDB 접속됨
db 목록 확인
1
2
3
4
5
6
7
8
9
10
|
SQL>
set lines 200 pages 1000
col name for a20
select con_id, name, open_mode, dbid, con_uid, guid from v$containers;
CON_ID NAME OPEN_MODE DBID CON_UID GUID
---------- -------------------- ---------- ---------- ---------- --------------------------------
1 CDB$ROOT READ WRITE 1439412780 1 045475B3845D512BE0631C2846649692
2 PDB$SEED READ ONLY 858304067 858304067 045475B3845E512BE0631C2846649692
3 FREEPDB1 READ WRITE 1946570654 1946570654 17038F39B97AB4F8E0631789A8C022D9
|
cdb와 pdb seed, pdb1이 존재함
sqlplus 접속 테스트(리스너 이용 pdb접속)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
예시
[username]/[password]@[hostname]:[port]/[DB service name] [as sysdba]
PDB 접속
$ sqlplus sys/oracle@localhost:1521/FREEPDB1 as sysdba
SQL*Plus: Release 23.0.0.0.0 - Production on Sat Apr 27 01:42:03 2024
Version 23.3.0.23.09
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09
SQL> show con_name
CON_NAME
------------------------------
FREEPDB1
|
정상적으로 PDB 접속됨
cdb로 세션 스위칭
1
2
3
4
5
6
7
8
9
|
SQL> ALTER SESSION SET CONTAINER = CDB$ROOT;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
|
간단한 세션 변경 확인 테스트
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#세션 PDB로 전환
SQL> ALTER SESSION SET CONTAINER = FREEPDB1;
Session altered.
# 확인
SQL> show con_name
CON_NAME
------------------------------
FREEPDB1
#오브젝트 수 확인
SQL> select count(*) from dba_objects;
COUNT(*)
----------
70223
#세션 CDB로 전환
SQL> ALTER SESSION SET CONTAINER = CDB$ROOT;
Session altered.
# 확인
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
#오브젝트 수 확인
SQL> select count(*) from dba_objects;
COUNT(*)
----------
68895
|
cdb와 pdb의 오브젝트 수가 다름을 확인 가능
참고 : 패스워드 파일이 없는 경우 생성
1 2 3 4 | $ cd $ORACLE_HOME/dbs $ orapwd file=/opt/oracle/product/23c/dbhomeFree/dbs/orapwFREE format=12 force=y Enter password for SYS: <-- oracle 입력함 |
RPM으로 설치한 Oracle 삭제
db 제거(root 계정)
datafile, 리스너, 설정 파일 등을 모두 지움
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# /etc/init.d/oracle-free-23c delete
Deleting Oracle Listener.
Deleting Oracle Database FREE.
[WARNING] [DBT-05509] Failed to connect to the specified database (FREE).
CAUSE: OS Authentication might be disabled for this database (FREE).
ACTION: Specify a valid sysdba user name and password to connect to the database.
[WARNING] [DBT-11503] The instance (FREE) is not running on the local node. This may result in partial delete of Oracle database.
CAUSE: A locally running instance is required for complete deletion of Oracle database instance and database files.
ACTION: Specify a locally running database, or execute DBCA on a node where the database instance is running.
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
36% complete
[WARNING] ORA-12547: TNS:lost contact
39% complete
42% complete
45% complete
49% complete
52% complete
ORA-12547: TNS:lost contact
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE0.log" for further details.
|
일부 에러가 발생하였지만 completed라고 나옴
Oracle Software 제거(root 계정)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# yum remove oracle-database-free-23c
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Removing:
oracle-database-free-23c x86_64 1.0-1 @@commandline 4.0 G
Transaction Summary
==============================================================================================================================================================================================================
Remove 1 Package
Freed space: 4.0 G
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-free-23c-1.0-1.x86_64 1/1
Erasing : oracle-database-free-23c-1.0-1.x86_64 1/1
Running scriptlet: oracle-database-free-23c-1.0-1.x86_64 1/1
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Verifying : oracle-database-free-23c-1.0-1.x86_64 1/1
Removed:
oracle-database-free-23c-1.0-1.x86_64
Complete!
|
preinstall 내용 제거(선택사항)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# yum remove oracle-database-preinstall-23c
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Removing:
oracle-database-preinstall-23c x86_64 1.0-1.el8 @@commandline 79 k
Removing unused dependencies:
compat-openssl10 x86_64 1:1.0.2o-4.el8_6 @ol8_appstream 2.9 M
ksh x86_64 20120801-259.0.1.el8 @ol8_appstream 3.2 M
lm_sensors-libs x86_64 3.4.0-23.20180522git70f7e08.el8 @ol8_baseos_latest 87 k
sysstat x86_64 11.7.3-11.0.1.el8 @ol8_appstream 1.4 M
Transaction Summary
==============================================================================================================================================================================================================
Remove 5 Packages
Freed space: 7.7 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-preinstall-23c-1.0-1.el8.x86_64 1/1
Running scriptlet: oracle-database-preinstall-23c-1.0-1.el8.x86_64 1/5
Erasing : oracle-database-preinstall-23c-1.0-1.el8.x86_64 1/5
Running scriptlet: oracle-database-preinstall-23c-1.0-1.el8.x86_64 1/5
Running scriptlet: sysstat-11.7.3-11.0.1.el8.x86_64 2/5
Erasing : sysstat-11.7.3-11.0.1.el8.x86_64 2/5
Running scriptlet: sysstat-11.7.3-11.0.1.el8.x86_64 2/5
Erasing : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 3/5
Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 3/5
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Erasing : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 4/5
Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64 4/5
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Running scriptlet: ksh-20120801-259.0.1.el8.x86_64 5/5
Erasing : ksh-20120801-259.0.1.el8.x86_64 5/5
Running scriptlet: ksh-20120801-259.0.1.el8.x86_64 5/5
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Verifying : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 1/5
Verifying : ksh-20120801-259.0.1.el8.x86_64 2/5
Verifying : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 3/5
Verifying : oracle-database-preinstall-23c-1.0-1.el8.x86_64 4/5
Verifying : sysstat-11.7.3-11.0.1.el8.x86_64 5/5
Removed:
compat-openssl10-1:1.0.2o-4.el8_6.x86_64 ksh-20120801-259.0.1.el8.x86_64 lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64 oracle-database-preinstall-23c-1.0-1.el8.x86_64
sysstat-11.7.3-11.0.1.el8.x86_64
Complete!
|
삭제 확인($ORACLE_BASE)
1
2
3
4
5
6
7
|
$ cd /opt/oracle/
$ ls -al
total 4
drwxr-xr-x. 4 oracle oinstall 37 Apr 27 06:35 .
drwxr-xr-x. 4 root root 36 Apr 27 01:22 ..
drwxr-xr-x. 4 oracle oinstall 31 Apr 27 01:32 cfgtoollogs
drwxrwxr-x. 25 oracle oinstall 4096 Apr 27 01:22 diag
|
로그파일을 제외하고 모두 지워짐
삭제 확인(datafile 경로)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ cd /app/oracle/oradata/FREE
$ ls -al
total 2383964
drwxr-x---. 4 oracle oinstall 231 Apr 27 01:35 .
drwxr-xr-x. 3 oracle dba 18 Apr 27 01:33 ..
-rw-r-----. 1 oracle oinstall 18759680 Apr 27 01:48 control01.ctl
-rw-r-----. 1 oracle oinstall 18759680 Apr 27 01:48 control02.ctl
drwxr-x---. 2 oracle oinstall 104 Apr 27 01:40 FREEPDB1
drwxr-x---. 2 oracle oinstall 85 Apr 27 01:36 pdbseed
-rw-r-----. 1 oracle oinstall 209715712 Apr 27 01:50 redo01.log
-rw-r-----. 1 oracle oinstall 209715712 Apr 27 01:52 redo02.log
-rw-r-----. 1 oracle oinstall 209715712 Apr 27 01:48 redo03.log
-rw-r-----. 1 oracle oinstall 597696512 Apr 27 01:48 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 1111498752 Apr 27 01:48 system01.dbf
-rw-r-----. 1 oracle oinstall 20979712 Apr 27 01:48 temp01.dbf
-rw-r-----. 1 oracle oinstall 57679872 Apr 27 01:48 undotbs01.dbf
-rw-r-----. 1 oracle oinstall 5251072 Apr 27 01:48 users01.dbf
|
파일이 지워졌어야 하지만 확인결과 파일들이 남아있음
db 파일 delete 시 에러가 발생해서 이 파일들은 제대로 지워지지 않은듯함(공식 가이드대로 했는데 뭔가 문제가 있는듯함..)
참조 :
https://www.oracle.com/database/free/get-started/
https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/toc.htm
https://docs.oracle.com/en/database/oracle/oracle-database/23/xeinl/deinstalling-oracle-database-free-software-linux.html#GUID-3F29EE7C-4546-49EE-B894-027EE3E371BF
https://tuna.tistory.com/81
'ORACLE > Install' 카테고리의 다른 글
Oracle Linux 8.4에 Oracle 23ai Free RPM 설치 및 삭제 가이드 (0) | 2024.05.03 |
---|---|
Oracle 23ai Free non-container 설치 시도(실패) (0) | 2024.04.28 |
Oracle Linux 8.4에 Oracle 19c Client Silent 모드 설치 가이드 (2) | 2023.11.27 |
Windows 11에 Oracle 21c XE 설치 가이드 (0) | 2023.11.21 |
Oracle Linux 8.4에 Oracle 19c RAC to RAC ADG 설치 가이드_Part 4 (0) | 2022.04.11 |