본문 바로가기
Oracle/설치

[23ai free]를 rpm으로 설치해보기

by 취미툰 2024. 10. 28.
반응형

신기술을 테스트해보기 위해 23ai를 개인 VM에 설치했습니다.

rpm으로 설치시에 간단히 preinstall.rpm으로 설치전 설정을 자동으로 해주고, install.rpm으로 편하게 설치를 해주네요.

 

OS는 linux 8이상 설치가능합니다.

 

설치OS : centos 9

DB 버전 : Oracle 23ai free

 

설치 url : https://www.oracle.com/kr/database/free/get-started/

 

무료 Oracle Database – 빠른 시작 가이드

빠르고 간단한 시작 가이드를 통해 Oracle Database 23을 무료로 설치하고 연결하는 방법을 살펴보세요.

www.oracle.com

 

 

1.(root에서 수행) rpm을 다운받아 VM에 넣은 후 preinstall부터 설치합니다.

[root@ysbae tmp]# rpm -ivh oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm
warning: oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8d8b756f: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-preinstall-23ai-1################################# [100%]

 

에러가 발생시에는 아래 명령어로 필요 라이브러리를 설치해줍니다.

yum 이 아니라 dnf로 명령어가 변경되었네요.

[root@ysbae tmp]# dnf -y install xorg-x11-utils
Last metadata expiration check: 1:04:35 ago on Thu Oct 24 16:59:39 2024.
Dependencies resolved.
==================================================================================================================================
 Package                           Architecture              Version                           Repository                    Size
==================================================================================================================================
Installing:
 xorg-x11-utils                    x86_64                    7.5-40.el9                        appstream                    110 k
Installing dependencies:
 libXxf86dga                       x86_64                    1.1.5-8.el9                       appstream                     21 k
 libdmx                            x86_64                    1.1.4-12.el9                      appstream                     17 k

Transaction Summary
==================================================================================================================================
Install  3 Packages

Total download size: 149 k
Installed size: 338 k
Downloading Packages:
(1/3): libdmx-1.1.4-12.el9.x86_64.rpm                                                              43 kB/s |  17 kB     00:00
(2/3): xorg-x11-utils-7.5-40.el9.x86_64.rpm                                                       242 kB/s | 110 kB     00:00
(3/3): libXxf86dga-1.1.5-8.el9.x86_64.rpm                                                          46 kB/s |  21 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                             129 kB/s | 149 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                          1/1
  Installing       : libdmx-1.1.4-12.el9.x86_64                                                                               1/3
  Installing       : libXxf86dga-1.1.5-8.el9.x86_64                                                                           2/3
  Installing       : xorg-x11-utils-7.5-40.el9.x86_64                                                                         3/3
  Running scriptlet: xorg-x11-utils-7.5-40.el9.x86_64                                                                         3/3
  Verifying        : libXxf86dga-1.1.5-8.el9.x86_64                                                                           1/3
  Verifying        : libdmx-1.1.4-12.el9.x86_64                                                                               2/3
  Verifying        : xorg-x11-utils-7.5-40.el9.x86_64                                                                         3/3

Installed:
  libXxf86dga-1.1.5-8.el9.x86_64             libdmx-1.1.4-12.el9.x86_64             xorg-x11-utils-7.5-40.el9.x86_64

Complete!

 

 

2.oracle database rpm 설치

해당 rpm으로 엔진설치를 완료했습니다.

커맨드로도 나오듯이 /etc/sysconfig/oracle-free-23ai.conf 를 수행하여 DB를 생성해야 합니다.

저는 default로 설치할 예정이기 때문에 설정값 건드리지 않고 바로 DB를 설치하겠습니다.

[root@ysbae tmp]# rpm -ivh oracle-database-free-23ai-1.0-1.el9.x86_64.rpm
warning: oracle-database-free-23ai-1.0-1.el9.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8d8b756f: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-free-23ai-1.0-1  ################################# [100%]
[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-23ai.conf' and then run '/etc/init.d/oracle-free-23ai configure' as root.

 

3.

DB 설치전 자동생성한 oracle유저 passwd 변경

[root@ysbae ~]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

 

4.root에서 수행 db 설치

[root@ysbae ~]# /etc/init.d/oracle-free-23ai configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters i          n length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be us          ed for SYS, SYSTEM and PDBADMIN accounts:
The password you entered contains invalid characters. Enter password: oracle
Confirm the password:
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
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: ysbae/FREEPDB1
     Multitenant container database: ysbae

 

 

FREE이름으로 된 CDB가 생성되었습니다.

 

oracle유저의 defefault 경로를 oracle bash_profile에 추가해주고 접속을 시도해봅니다.

vi .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
# DB defaults
export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
export ORACLE_SID=FREE
export TEMPLATE_NAME=FREE_Database.dbc
export PDB_NAME=FREEPDB1
export LISTENER_NAME=LISTENER
export NUMBER_OF_PDBS=1
export CREATE_AS_CDB=true

 

 

접속 시도시에 아래 명령어를 사용합니다.

CDB에 접속 시

[oracle@ysbae ~]$ sqlplus sys@localhost:1521/FREE as sysdba

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on Fri Oct 25 19:12:08 2024
Version 23.5.0.24.07

Copyright (c) 1982, 2024, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.5.0.24.07

 

PDB에 접속시

[oracle@ysbae ~]$ sqlplus sys@localhost:1521/FREEPDB1 as sysdba

SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on Fri Oct 25 19:12:34 2024
Version 23.5.0.24.07

Copyright (c) 1982, 2024, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.5.0.24.07

 

 

DB 기동/중지는 root로 수행합니다.

--중지
/etc/init.d/oracle-free-23ai stop
--기동
/etc/init.d/oracle-free-23ai start

설치는 금방되네요. 23ai는 어떤기능들이 있는지 하나씩 테스트해볼 재미가 있겠습니다.

 

 

반응형

댓글