Oracle 12c silent 모드 설치
사전 준비
커널 파라미터 설정
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4056393728
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
sysctl -p
User Limit 설정
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
의존 패키지 설치
yum update -y
yum install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686libX11 libX11.i686libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC-devel zip unzip libXrender
Oracle 시스템 사용자 설정
Oracle 사용자 생성
groupadd dba
useradd oracle -g dba
passwd oracle
Oracle 경로 생성
mkdir -p /app/oracle /app/oraInventory
chown oracle:dba /app/oracle /app/oraInventory
프로파일
vi ~/.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=dsrc
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/12.2
export ORACLE_SID=orcl
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Oracle Instance 설치
Installer 준비
다음 경로에서 Oracle Database 12c Release 2
를 다운받아 설치할 서버에 업로드한다. (로그인 필요)
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
압축을 풀고,
unzip linuxx64_12201_database.zip
responseFile 을 수정한 다음,
vi ./database/response/db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/app/oraInventory
ORACLE_HOME=/app/oracle/12.2
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=dba
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.config.starterdb.characterSet=AL32UTF8
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
Installer 를 실행한다.
./database/runInstaller -ignoreSysPrereqs -showProgress -silent -responseFile /home/oracle/database/response/db_install.rsp
Database 생성
dbca
를 silent 모드로 실행하기 위해서 먼저 responseFile 을 작성한다.
vi $ORACLE_HOME/assistants/dbca/dbca.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0
gdbName=orcl
templateName=General_Purpose.dbc
sysPassword=oracle
systemPassword=oracle
emExpressPort=5500
dbsnmpPassword=oracle
characterSet=AL32UTF8
이어서 아래 명령으로 dbca
를 실행하면 데이터베이스 생성 끝.
dbca -silent -createDatabase -responseFile /app/oracle/12.2/assistants/dbca/dbca.rsp
Listener 생성
아래 명령으로 netca
를 실행하면 기본 리스너가 생성된다.
netca -silent -responseFile /app/oracle/12.2/assistants/netca/netca.rsp