신문지한장

[Install] oracle 12c install on Centos7.9 본문

Oracle/Install

[Install] oracle 12c install on Centos7.9

신문지한장 2024. 4. 18. 14:40
OS : CentOS7.9 (64bit)
DB : Oracle Database 12c ( Release - 12.2 )

 

1. OS 설정

1-1. 설치 환경 점검

설치 계정 : oracle

소속 그룹 : dba

홈 디렉토리 : /home/oracle

$ORACLE_BASE : /oracle/app/oracle

$ORACLE_HOME : $ORACLE_BASE/product/12.2.0

 

 

1-2. Linux CentOS 7 패키지 설치안내

  • OS 설치 시 패키지 선택 부분의 ‘**호환성 라이브러리’**를 선택하여 전체 선택한다.
  • OS 설치 후 추가적으로 패키지를 설치한다
[root@DBTEST ~]# java -version
[root@DBTEST ~]# yum -y install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel
[root@DBTEST ~]# yum -y install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel
[root@DBTEST ~]# yum -y install libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel
[root@DBTEST ~]# yum -y install unzip
[root@DBTEST ~]# yum -y install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel

[root@DBTEST ~]# yum -y install binutils compat-libcap1 gcc gcc-c++ glibc glibc.i686
[root@DBTEST ~]# yum -y install glibc-devel glibc.i686 ksh libaio libaio.i686 libaio-devel
[root@DBTEST ~]# yum -y install libaio-devel.i686 libgcc libgcc.i686 libstdc++
[root@DBTEST ~]# yum -y install libstdc++l7.i686 libstdc++-devel libstdc++-devel.i686
[root@DBTEST ~]# yum -y install compat-libstdc++-33 compat-libstdc++-33.i686 libXi libXi.i686
[root@DBTEST ~]# yum -y install libXtst libXtst.i686 make sysstat

 

2-3. 커널 파라미터 설정

[root@DBTEST ~]# vi /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).

--내용추가--
kernel.sem = 1000 32000 1000 1000
kernel.shmmni = 16384
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 16777216
#fs.inode-max=67108864
fs.aio-max-nr = 1048576
----------

 

2-4. 유저 자원 사용값 설정

[root@DBTEST ~]#  vi /etc/security/limits.conf
# /etc/security/limits.conf

--내용추가--
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
----------

# End of file

 

 

2. Oracle Database 12c S/W 설치

2-1. 설치 준비

  • xwindow 활성화 후 runInstaller 실행
[oracle@DBTEST 12.2.0.1]$ export DISPLAY=:0.0
[oracle@DBTEST 12.2.0.1]$ echo $DISPLAY
0.0
[oracle@DBTEST 12.2.0.1]$ xhost +
access control disabled, clients can connect from any host
[oracle@DBTEST 12.2.0.1]$ cd database/
[oracle@DBTEST database]$./runInstaller
Oracle Database 설정 마법사 실행 중...

 

2-2. S/W 설치 진행

 

 

[root@DBTEST ~]# cd /oracle/app/oraInventory/orainstRoot.sh
다음 권한 변경 중/oracle/app/oraInventory.
그룹에 대한 읽기, 쓰기 권한을 추가하는 중입니다.
월드에 대한 읽기, 쓰기, 실행 권한을 제거하는 중입니다.

그룹 이름 변경 중 /oracle/app/oraInventory 대상 dba.
스크립트 실행이 완료되었습니다.

[root@DBTEST ~]# cd /oracle/app/oracle/product/12.2.0.1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/app/oracle/product/12.2.0.1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :

Oracle Trace File Analyzer (TFA - User Mode) is available at :
    /oracle/app/oracle/product/12.2.0.1/suptools/tfa/release/tfa_home/bin/tfactl

OR

Oracle Trace File Analyzer (TFA - Daemon Mode) can be installed by running this script :
    /oracle/app/oracle/product/12.2.0.1/suptools/tfa/release/tfa_home/install/roottfa.sh

 

3. Oracle Database 12c listener 생성

3-1. Listener 생성을 위한 netca 실행

[oracle@DBTEST database]$ netca

 

3-2. Listener 생성시작

5. Oracle Database 12c Database 생성

5-1. DB 생성을 위해 dbca 실행

[oracle@DBTEST 12.2.0.1]$ dbca

 

5-2. DB 접속확인

[orcl12]DBTEST:/oracle/app/oracle/product/12.2.0/database> :sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on 금 8월 12 11:26:05 2022

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


다음에 접속됨:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production