Install 12cR2 on Linux silent mode

  • no need GUI
  • just copy&paste&run&fun.

1. Create os user

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

1. Configure kernel

echo “fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8329226240
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” >> /etc/sysctl.conf

apply parameters

sysctl -p
sysctl -a

2. Set limits for oracle

echo “oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536” >> /etc/security/limits.conf

3. Install 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

4. Configure hostname

hostnamectl set-hostname dbserver
echo "dbserver " >> /etc/hosts

5. Configure bash profile

mkdir /oracle/12c
echo “ORACLE_BASE=/oracle/12c;export ORACLE_BASE
ORACLE_HOME=/oracle/12c/product/12.1.0/dbhome_1;export ORACLE_HOME
ORACLE_SID=cdb;export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH” ~/.bash_profile

6. Install 12c without x11

Response file

echo “oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
ORACLE_HOSTNAME=dbserver
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/oracle/inventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/oracle/12c/product/12.1.0/dbhome_1
ORACLE_BASE=/oracle/12c
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.BACKUPDBA_GROUP=oinstall
oracle.install.db.DGDBA_GROUP=oinstall
oracle.install.db.KMDBA_GROUP=oinstall” >> /oracle/install_12c.rsp

runInstaller

./runInstaller -ignoreSysPrereqs -ignorePrereq -waitforcompletion -showProgress -silent -responseFile /oracle/install_12c.rsp

7. Create Listener

echo ‘[GENERAL]
RESPONSEFILE_VERSION=“12.1”
CREATE_TYPE=“CUSTOM”
[oracle.net.ca]
INSTALLED_COMPONENTS={“server”,“net8”,“javavm”}
INSTALL_TYPE="“typical”"
LISTENER_NUMBER=1
LISTENER_NAMES={“LISTENER”}
LISTENER_PROTOCOLS={“TCP;1521”}
LISTENER_START="“LISTENER”"
NAMING_METHODS={“TNSNAMES”,“ONAMES”,“HOSTNAME”}
NSN_NUMBER=1
NSN_NAMES={“EXTPROC_CONNECTION_DATA”}
NSN_SERVICE={“PLSExtProc”}
NSN_PROTOCOLS={“TCP;HOSTNAME;1521”}’ >> /oracle/netca.rsp

run netca

$ORACLE_HOME/bin/netca -silent -responsefile /oracle/netca.rsp

8. Create database

response file

echo ‘[GENERAL]
RESPONSEFILE_VERSION = “12.1.0”
OPERATION_TYPE = “createDatabase”
[CREATEDATABASE]
GDBNAME = “cdb1”
SID = “cdb1”
CREATEASCONTAINERDATABASE = true
DATAFILEDESTINATION = /oradata
RECOVERYAREADESTINATION=/oradata/flash_recovery_area
NUMBEROFPDBS = 1
PDBNAME = pdb1
PDBADMINPASSWORD = “”
TEMPLATENAME = “General_Purpose.dbc”
SYSPASSWORD = “”
SYSTEMPASSWORD = “”
CHARACTERSET = “AL32UTF8”
AUTOMATICMEMORYMANAGEMENT = “FALSE”’ >> /oracle/dbca.rsp

run dbca

$ORACLE_HOME/bin/dbca -silent -responseFile /`oracle/dbca.rsp

5 Likes