CentOS7 - Oracle Database XE 18c 설치

먼저, root 권한으로 설치 해야 한다.

1. Preinstall RPM 을 다운받고 설치한다.

# curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
# yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-18c-1.0-1.el7.x86_64
Marking oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-18c.x86_64 0:1.0-1.el7 will be installed
--> Processing Dependency: compat-libcap1 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
base                                                                                   | 3.6 kB  00:00:00     
extras                                                                                 | 2.9 kB  00:00:00     
mysql-connectors-community                                                             | 2.6 kB  00:00:00     
mysql-tools-community                                                                  | 2.6 kB  00:00:00     
mysql56-community                                                                      | 2.6 kB  00:00:00     
updates                                                                                | 2.9 kB  00:00:00     
--> Processing Dependency: compat-libstdc++-33 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Processing Dependency: ksh for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
---> Package ksh.x86_64 0:20120801-142.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                       Arch   Version          Repository                                        Size
==============================================================================================================
Installing:
 oracle-database-preinstall-18c
                               x86_64 1.0-1.el7        /oracle-database-preinstall-18c-1.0-1.el7.x86_64  55 k
Installing for dependencies:
 compat-libcap1                x86_64 1.10-7.el7       base                                              19 k
 compat-libstdc++-33           x86_64 3.2.3-72.el7     base                                             191 k
 ksh                           x86_64 20120801-142.el7 base                                             884 k
 libaio-devel                  x86_64 0.3.109-13.el7   base                                              13 k

Transaction Summary
==============================================================================================================
Install  1 Package (+4 Dependent packages)

Total size: 1.1 M
Total download size: 1.1 M
Installed size: 4.0 M
Downloading packages:
(1/4): compat-libcap1-1.10-7.el7.x86_64.rpm                                            |  19 kB  00:00:00     
(2/4): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm                                     | 191 kB  00:00:00     
(3/4): libaio-devel-0.3.109-13.el7.x86_64.rpm                                          |  13 kB  00:00:00     
(4/4): ksh-20120801-142.el7.x86_64.rpm                                                 | 884 kB  00:00:00     
--------------------------------------------------------------------------------------------------------------
Total                                                                         6.9 MB/s | 1.1 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                    1/5 
  Installing : ksh-20120801-142.el7.x86_64                                                                2/5 
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                         3/5 
  Installing : compat-libcap1-1.10-7.el7.x86_64                                                           4/5 
  Installing : oracle-database-preinstall-18c-1.0-1.el7.x86_64                                            5/5 
  Verifying  : compat-libcap1-1.10-7.el7.x86_64                                                           1/5 
  Verifying  : oracle-database-preinstall-18c-1.0-1.el7.x86_64                                            2/5 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                         3/5 
  Verifying  : ksh-20120801-142.el7.x86_64                                                                4/5 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                    5/5 

Installed:
  oracle-database-preinstall-18c.x86_64 0:1.0-1.el7                                                           

Dependency Installed:
  compat-libcap1.x86_64 0:1.10-7.el7                 compat-libstdc++-33.x86_64 0:3.2.3-72.el7                
  ksh.x86_64 0:20120801-142.el7                      libaio-devel.x86_64 0:0.3.109-13.el7                     

Complete!

 

2. XE 18c 다운로드와 설치

https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html 에서 oracle-database-xe-18c-1.0-1.x86_64.rpm을 다운받고 설치한다.

# yum -y localinstall oracle-database-xe-18c-1.0-1.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining oracle-database-xe-18c-1.0-1.x86_64.rpm: oracle-database-xe-18c-1.0-1.x86_64
Marking oracle-database-xe-18c-1.0-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-xe-18c.x86_64 0:1.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package                       Arch          Version        Repository                                   Size
==============================================================================================================
Installing:
 oracle-database-xe-18c        x86_64        1.0-1          /oracle-database-xe-18c-1.0-1.x86_64        5.2 G

Transaction Summary
==============================================================================================================
Install  1 Package

Total size: 5.2 G
Installed size: 5.2 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : oracle-database-xe-18c-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 XE, optionally modify the parameters in '/etc/sysconfig/oracle-xe-18c.conf' and then execute '/etc/init.d/oracle-xe-18c configure' as root.
  Verifying  : oracle-database-xe-18c-1.0-1.x86_64                                                        1/1 

Installed:
  oracle-database-xe-18c.x86_64 0:1.0-1                                                                       

Complete!


3. 데이터베이스 생성

# /etc/init.d/oracle-xe-18c 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:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
SYS 사용자 비밀번호 입력: 
*********
SYSTEM 사용자 비밀번호 입력: 
******* 
PDBADMIN 사용자 비밀번호 입력: 
*********
DB 작업 준비
7% 완료
데이터베이스 파일 복사 중
29% 완료
Oracle 인스턴스 생성 및 시작 중
30% 완료
31% 완료
34% 완료
38% 완료
41% 완료
43% 완료
데이터베이스 생성 완료 중
47% 완료
50% 완료
플러그인할 수 있는 데이터베이스 생성 중
54% 완료
71% 완료
사후 구성 작업 실행 중
93% 완료
사용자 정의 스크립트 실행 중
100% 완료
데이터베이스 생성이 완료되었습니다. 자세한 내용은 다음의 로그 파일에서 확인하십시오.
 /opt/oracle/cfgtoollogs/dbca/XE
데이터베이스 정보:
전역 데이터베이스 이름:XE
SID(시스템 식별자):XE
자세한 내용은 로그 파일 "/opt/oracle/cfgtoollogs/dbca/XE/XE.log"을(를) 참조하십시오.

Connect to Oracle Database using one of the connect strings:
     Pluggable database: vm14/XEPDB1
     Multitenant container database: vm14
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE


4. 환경변수 설정

오라클용 user를 생성해서 .bash_profile 에 다음과 같은 내용으로 환경변수 설정.

  • export ORACLE_SID=XE
  • export ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
  • export ORACLE_BASE=/opt/oracle
  • PATH=기존PATH경로:$ORACLE_HOME/bin
  • export PATH

오라클용 user로 로그인해서 환경변수가 적용되게 한 후 아래와 같이 sqlplus 사용할 수 있다.

# sqlplus '/as sysdba'

startup이나 shutdown 할때 이렇게 접속하면 됨. (설치하게 되면 이미 startup 상태이므로 startup 할 필요 없다.)

 

5. 방화벽 포트 오픈

# firewall-cmd --permanent --add-port=1521/tcp
# firewall-cmd --reload

 

CentOS Oracle System

MariaDB/MySQL 재귀쿼리로 달력 만들기

Coding MariaDB MySQL SQL

CentOS7 - Oracle Database XE 18c 설치

CentOS Oracle System

Wi-Fi 6E Card 설치기

Hardware

마우스 수리기

Hardware

나도 10년 만에 PC 업그레이드 이야기 2020-12

Hardware

티베로 데이터베이스 추가 (CentOS Linux 환경)

CentOS System Tibero