Home / Articles / Database / oracle-database / 12c / oracle-12c-r2-install-using-response-file

Oracle Database 12c Release 2 Using Response Files on Linux 7

System Setup

ParameterValue
vCPU1
RAM2 GB
SWAP2GB
/tmp2 GB
/u0120GB

Prerequisites

  • Login as root user or with a user having root sudo privileges
  • Hosts File
  • The "/etc/hosts" file must contain a fully qualified name for the server.

    # vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 192.168.50.15 ora-15.linuxtechspace.com ora-15
  • Install Required Packages
  • Create a new file containing the list of package that are required for oracle database install.

    #vi rpm_packages binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat ksh

    Install the packages

    # yum install $(cat rpm_packages) Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. localrepo | 2.9 kB 00:00:00 localrepo/primary_db | 4.2 MB 00:00:00 Package binutils-2.27-34.base.el7.x86_64 already installed and latest version Package compat-libcap1-1.10-7.el7.x86_64 already installed and latest version No package compat-libstdc++ available. Package gcc-4.8.5-36.el7.x86_64 already installed and latest version Package gcc-c++-4.8.5-36.el7.x86_64 already installed and latest version Package glibc-2.17-260.el7.x86_64 already installed and latest version Package glibc-devel-2.17-260.el7.x86_64 already installed and latest version Package libaio-0.3.109-13.el7.x86_64 already installed and latest version Package libgcc-4.8.5-36.el7.x86_64 already installed and latest version Package libstdc++-4.8.5-36.el7.x86_64 already installed and latest version Package libstdc++-devel-4.8.5-36.el7.x86_64 already installed and latest version Package libXi-1.7.9-1.el7.x86_64 already installed and latest version Package libXtst-1.2.3-1.el7.x86_64 already installed and latest version Package 1:make-3.82-23.el7.x86_64 already installed and latest version Package sysstat-10.1.5-17.el7.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package ksh.x86_64 0:20120801-139.el7 will be installed ---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================== Installing: ksh x86_64 20120801-139.el7 localrepo 885 k libaio-devel x86_64 0.3.109-13.el7 localrepo 13 k Transaction Summary ============================================================================================================================================================== Install 2 Packages Total download size: 898 k Installed size: 3.1 M Is this ok [y/d/N]: y Downloading packages: (1/2): libaio-devel-0.3.109-13.el7.x86_64.rpm | 13 kB 00:00:00 (2/2): ksh-20120801-139.el7.x86_64.rpm | 885 kB 00:00:00 -------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.5 MB/s | 898 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libaio-devel-0.3.109-13.el7.x86_64 1/2 Installing : ksh-20120801-139.el7.x86_64 2/2 Verifying : ksh-20120801-139.el7.x86_64 1/2 Verifying : libaio-devel-0.3.109-13.el7.x86_64 2/2 Installed: ksh.x86_64 0:20120801-139.el7 libaio-devel.x86_64 0:0.3.109-13.el7 Complete!
  • Disable Firewall
  • Disable the firewall service for the install. Configure it back after install if required.

    # systemctl stop firewalld # systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
  • Disable SELINUX
  • Set secure Linux to disabled using selinux configuration file.

    # vim /etc/sysconfig/selinux SELINUX=disabled

    Disable selinux at runtime.

    # setenforce 0 setenforce: SELinux is disabled

Create User & Groups

  • Create oracle user and its required groups
  • # useradd oracle # groupadd oinstall # groupadd dba # usermod -g oinstall -G dba,oracle oracle
  • Set password for oracle user
  • # passwd oracle Changing password for user oracle. New password: Retype new password: passwd: all authentication tokens updated successfully.

Set Kernel Parameters

  • SYSCTL Parameters
  • Add the required kernel parameters.

    # vi /etc/sysctl.conf 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

    Reload the configuration file to reflect changes

    # sysctl -p
  • LIMITS Parameter
  • Add the required ulimit parameters.

    # 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 oracle hard stack 32768

Create Install Directories

    Create the oracle database install directory and set the required ownership.

    # chown -R oracle:oinstall /u01 # chmod -R 775 /u01 # chmod g+s /u01

Extract Oracle Installer File

    Download the Oracle database installer from Official Oracle website. Copy the installer to /software directory

    # mkdir /software # cd /software # unzip linuxx64_12201_Oracle_database.zip

Install Oracle Database Software

  • Login as oracle user
  • Create the response file with following contents
  • # vi /home/oracle/db_install.rsp oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1 ORACLE_BASE=/u01/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 SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true
  • Execute the database install script
  • # cd /software/database # ./runInstaller -silent -responseFile /home/oracle/db_install.rsp Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 6104 MB Passed Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-12-24_08-23-02PM. Please wait ... [oracle@ora-17 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. installActions2020-12-24_08-23-02PM.log ACTION: Identify the list of failed prerequisite checks from the log: installActions2020-12-24_08-23-02PM.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: /u01/app/oraInventory/logs/installActions2020-12-24_08-23-02PM.log
  • Monitor the log file for install status and check when it prompts to run the manual scripts as root user
  • As a root user, execute the following script(s): 1. /u01/app/oraInventory/orainstRoot.sh 2. /u01/app/oracle/product/12.2.0/dbhome_1/root.sh Successfully Setup Software.
  • Open a new SSH session and login as root user
  • Execute orainstRoot.sh script as root user
  • # /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete.
  • Execute root.sh script as root user
  • # /u01/app/oracle/product/12.2.0/dbhome_1/root.sh Check /u01/app/oracle/product/12.2.0/dbhome_1/install/root_ora-17.linuxtechspace.com_2020-12-24_20-32-11-615627654.log for the output of root script

Configure oracle user environment variable

  • Login as oracle user
  • Configure .bashrc profile
  • # vim .bashrc TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1; export ORACLE_HOME ORACLE_SID=CDB1234; export ORACLE_SID PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
  • Bring the changes in effect
  • # source .bashrc

Oracle Database Network Configuration

  • Login as oracle user
  • Create response file with following contents
  • # vi /home/oracle/netca.rsp [GENERAL] RESPONSEFILE_VERSION="12.2" 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"}
  • Execute script to configure network and listener
  • # $ORACLE_HOME/bin/netca -silent -responsefile /home/oracle/netca.rsp Parsing command line arguments: Parameter "silent" = true Parameter "responsefile" = /home/oracle/netca.rsp Done parsing command line arguments. Oracle Net Services Configuration: Profile configuration complete. Oracle Net Listener Startup: Running Listener Control: /u01/app/oracle/product/12.2.0/dbhome_1/bin/lsnrctl start LISTENER Listener Control complete. Listener started successfully. Listener configuration complete. Oracle Net Services configuration successful. The exit code is 0

Create oracle database

  • Login as oracle user
  • Configure response file with following contents
  • # vi /home/oracle/dbca.rsp responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0 gdbName=CDB1234 sid=CDB1234 createAsContainerDatabase=true numberOfPDBs=1 pdbName=PDB1234 pdbAdminPassword=redhat123 templateName=General_Purpose.dbc sysPassword=redhat123 systemPassword=redhat123 oracleHomeUserPassword=redhat123 emConfiguration=NONE emExpressPort=5500 datafileDestination=/u01/app/oracle/oradata/ storageType=FS characterSet=AL32UTF8 databaseType=MULTIPURPOSE
  • Execute script to create the new database
  • # $ORACLE_HOME/bin/dbca -silent -createDatabase -responseFile /home/oracle/dbca.rsp Copying database files 1% complete 13% complete Creating and starting Oracle instance 26% complete 30% complete 41% complete Completing Database Creation 42% complete 50% complete Creating Pluggable Databases 55% complete 75% complete Executing Post Configuration Actions 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/CDB1234/CDB1234.log" for further details.
  • Database software install is now complete.

Database Status Check

  • Check that database is up and running
  • # ps -ef | grep -i pmon oracle 16344 1 0 21:48 ? 00:00:00 ora_pmon_CDB1234