CentOS 7에 Oracle DB 12c R2를 설치하는 데
꽤나 애먹은 관계로, (거의 1주일 날렸..ㅠ) 저처럼 고통을 겪으시는 일
없도록 깔끔하게 정리하여 포스트 합니다.
정말 잔 오류가 많이 났었지만, 이제는 10분 도 채 안걸리고
완벽하게 설치 가능해졌답니다 !
혹시 도중 막히는 부분이나 에러가 나거나 궁금한 점이 있으시다면,
댓글 남겨주세요!
최대한 빠른 시일 내에 답변을 올려드리겠습니다. ^^
낮에는 덥지만 아침 저녁으론 쌀쌀한 이 때
감기 다들 더욱 조심하시고, 행복한 하루 되세요!
그럼 Oracle DB 설치 시작합니다!
ORACLE 설치 가이드
They are all belong to CentOS 7.
Oracle Database Software Downloads
- Go to http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
- Download file which written Oracle Database 12c Release 2 - Linux x86-64
PRE-INSTALLATION TASKS (설치 사전 작업)
- To begin, make sure that all the packages currently installed on your RHEL/CentOS 7 system are updated to their latest versions.
$> yum update -y
- Next, installed all the required dependencies for the RDBMS, along with the zip and unzip packages.
$> yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip
- Create the user account and groups for Oracle.
$> groupadd oinstall
$> groupadd dba
$> useradd -g oinstall -G dba oracle
Finally, set a password for the newly created oracle account.$> passwd oracle
- Add the following kernel parameters to /etc/sysctl.conf file.
#######################################
# ORACLE
#######################################
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 3263597
kernel.shmmax = 16709617664
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
and apply them:$> sysctl -p
$> sysctl -a
- Set the limits for oracle in /etc/security/limits.conf file.
#######################################
# ORACLE
#######################################
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
- Create a directory named /stage and extract the zipped installation file.
$> unzip linuxx64_12201_database.zip -d /stage/
Before proceeding, create other directories that will be used during the actual installation, and assign the necessary permissions.$> mkdir /u01
$> mkdir /u02
$> chown -R oracle:oinstall /u01
$> chown -R oracle:oinstall /u02
$> chmod -R 775 /u01
$> chmod -R 775 /u02
$> chmod g+s /u01
$> chmod g+s /u02
- Login oracle account and Open a GUI session.
$> su - oracle
$> /stage/database/runInstaller
-'Create and configure a database ( 데이터베이스 생성 및 구성 )- Desktop class ( 데스크톱 클래스 )
- Oracle base : /u01/app/oracle (초기설정)
- Software location : /u01/app/oracle/product/12.2.0/dbhome_1 (초기설정)
- Database file location : /u02
- Database edition : Enterprise Edition (7.5GB) (초기설정)
- Character set : Unicode (AL32UTF8) (초기설정)
- OSDBA group : dba (초기설정)
- Global database name : oracle (초기설정)
- Inventory : /u01/app/oraInventory (초기설정)
- oraInventory Group Name : oinstall (초기설정)
- And we can see popup for Execute Configuration Scripts ( 구성 스크립트 실행 팝업 ). Using another terminal, login root and :
$> su
$> cd /u01/app/oraInventory
$> ./orainstRoot.sh
$> cd /u01/app/oracle/product/12.2.0/dbhome_1
$> ./root.sh
...
Enter the full pathname of the local bin directory: [/usr/local/bin] : <- 그냥 엔터 !
...
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes | [no] : no
...
And then click the ok button.
- Login oracle account and add the following lines to .bash_profile file.
#######################################
# ORACLE
#######################################
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_SID=oracle
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601
The last step is applying it.$> source .bash_profile
- And then login to the database using account oracle.
$> sqlplus system@oracle
SQL*Plus: Release 12.2.0.1.0 Production on Fri May 11 12:29:15 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
출처 : https://www.tecmint.com/install-oracle-database-12c-on-centos-7/
마침.