● centos 7 환경에서 oracle 12c silent mode 로 설치
가끔 오라클을 설치할때 GUI 방식을 사용하지 못할때가 있다.
그럴때는 silent 모드로 설치하면 되는데, 지금까지는 그냥 GUI 방식으로
일할수 있는 환경을 만들어 달라고 요구했었다.
이번에는 그런 환경이 여의치 않아 테스트 삼아 silent 방식으로 설치했다.
역시 IT 의 세계가 그렇듯이 한방에 되는건 없었다.
responseFile 에서 삽질에 삽질을 거듭하다 설치를 성공했다.
현시점으로는 EE 버전에서 12c R2 는 안나온것 같다.
오라클 버전은 Enterprise Edition 12.1.0.2.0 이다.
DB 는 containerDB 를 사용하는 것으로 설정했다.
많이 참고하십시요. 공감 구걸.
1. 환경설정 (root 유저)
- yum install
yum install -y binutils compat-libcap1 gcc gcc-c++ glibc glibc glibc-devel glibc-devel ksh compat-libstdc++-33 libaio libaio libaio-devel libaio-devel libgcc libgcc libstdc++ libstdc++ libstdc++-devel libstdc++-devel libXi libXi libXtst libXtst make sysstat xorg-x11-apps
- oracle 유저 생성
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -G dba oracle
[root@localhost ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
cd /
mkdir oracle
chown -R oracle:oinstall /oracle
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1987162112
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
vi /etc/security/limits.conf
( 파일 아래쪽에 )
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
2. oracle 설정 (oracle 유저)
su - oracle
vi /home/oracle/.bash_profile
------------ bash_profile --------------------------------------------------
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export TMP=/tmp
export ORACLE_HOSTNAME=ora12c
export ORACLE_UNQNAME=orcl
export ORACLE_SID=orcl
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
------------ bash_profile --------------------------------------------------
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
3. silent mode 로 Database 설치
cd /home/oracle/database
[oracle@oracdb database]$ ./runInstaller -silent \
> DECLINE_SECURITY_UPDATES=true \
> SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
> oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0 \
> oracle.install.option=INSTALL_DB_SWONLY \
> ORACLE_HOSTNAME=oracdb \
> UNIX_GROUP_NAME=dba \
> INVENTORY_LOCATION=/home/oracle/oraInventory \
> SELECTED_LANGUAGES=en \
> ORACLE_HOME=/oracle/product/12.1.0/dbhome_1 \
> ORACLE_BASE=/oracle \
> oracle.install.db.InstallEdition=EE \
> oracle.install.db.DBA_GROUP=oinstall \
> oracle.install.db.OPER_GROUP=dba \
> oracle.install.db.BACKUPDBA_GROUP=dba \
> oracle.install.db.DGDBA_GROUP=dba \
> oracle.install.db.KMDBA_GROUP=dba
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 14939 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3071 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-12-12_05-11-10PM. Please wait ...[oracle@oracdb database]$ [WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2017-12-12_05-11-10PM/installActions2017-12-12_05-11-10PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2017-12-12_05-11-10PM/installActions2017-12-12_05-11-10PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/home/oracle/oraInventory/logs/installActions2017-12-12_05-11-10PM.log
[oracle@oracdb database]$
[oracle@oracdb database]$
[oracle@oracdb database]$
[oracle@oracdb database]$ The installation of Oracle Database 12c was successful.
Please check '/home/oracle/oraInventory/logs/silentInstall2017-12-12_05-11-10PM.log' for more details.
As a root user, execute the following script(s):
1. /home/oracle/oraInventory/orainstRoot.sh
2. /oracle/product/12.1.0/dbhome_1/root.sh
Successfully Setup Software.
** root 로 접속해서 스크립트 실행
[root@oracdb ~]# sh /home/oracle/oraInventory/orainstRoot.sh
Changing permissions of /home/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /home/oracle/oraInventory to dba.
The execution of the script is complete.
[root@oracdb ~]# sh /oracle/product/12.1.0/dbhome_1/root.sh
Check /oracle/product/12.1.0/dbhome_1/install/root_oracdb_2017-12-12_17-16-25.log for the output of root script
[root@oracdb ~]#
** 똑같은 내용인데 silent 이하를 db_install.rsp 파일로 만들어서 responseFile 옵션넣고 실행하면 설치가 진행이 안된다. 그냥 커먼드라인에 붙여서 해결..
./runInstaller -silent \
DECLINE_SECURITY_UPDATES=true \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0 \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME=oracdb \
UNIX_GROUP_NAME=dba \
INVENTORY_LOCATION=/home/oracle/oraInventory \
SELECTED_LANGUAGES=en \
ORACLE_HOME=/oracle/product/12.1.0/dbhome_1 \
ORACLE_BASE=/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.DBA_GROUP=oinstall \
oracle.install.db.OPER_GROUP=dba \
oracle.install.db.BACKUPDBA_GROUP=dba \
oracle.install.db.DGDBA_GROUP=dba \
oracle.install.db.KMDBA_GROUP=dba
4. dbca.rsp 로 DB 생성
[oracle@oracdb response]$ dbca -silent -responseFile /home/oracle/database/response/dbca_fs.rsp
Enter PDBADMIN User Password:
Copying database files
1% complete
2% complete
8% complete
13% complete
19% complete
27% complete
Creating and starting Oracle instance
29% complete
32% complete
33% complete
34% complete
38% complete
42% complete
43% complete
45% complete
Completing Database Creation
48% complete
51% complete
53% complete
62% complete
70% complete
72% complete
Creating Pluggable Databases
78% complete
100% complete
Look at the log file "/oracle/cfgtoollogs/dbca/cdbtest/cdbtest.log" for further details.
--------------- dbca.rsp ------------------------------
[GENERAL]
RESPONSEFILE_VERSION = "12.1.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "cdbtest"
DATABASECONFTYPE = "SI"
SID = "cdbtest"
CREATEASCONTAINERDATABASE = true
NUMBEROFPDBS = 1
PDBNAME = pdb01
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
DATAFILEDESTINATION = /DATA01/oracle
RECOVERYAREADESTINATION= /DATA01/oracle/reco
STORAGETYPE=FS
CHARACTERSET = "US7ASCII"
NATIONALCHARACTERSET= "UTF8"
SAMPLESCHEMA=FALSE
MEMORYPERCENTAGE = "40"
DATABASETYPE = "MULTIPURPOSE"
AUTOMATICMEMORYMANAGEMENT = "TRUE"
TOTALMEMORY = "2048"
--------------- dbca.rsp ------------------------------
** 나는 12c 의 new feature 인 CDB, PDB 를 테스트 할 목적이라
CDB, PDB 를 생성하는 것으로 설정을 했다. 참고해서 자신의 용도에 맞게
설정을 수정하시길...
[oracle@oracdb response]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Dec 13 14:21:19 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select name, cdb from v$database;
NAME CDB
--------- ---
CDBTEST YES
SQL>
이상 끗