- Document Overview:-. 2
- Prerequisites: 2
- Preparing for Oracle 12c Installation. 2
- To begin, make sure that all the packages currently installed on your RHEL/CentOS 7system are updated to their latest versions. 2
- Next, installed all the required dependencies for the RDBMS, along with the zip and unzip packages. 2
- Create the user account and groups for Oracle. 3
- Add the following kernel parameters to /etc/sysctl.conf file. 3
- Set the limits for oracle in /etc/security/limits.conf file. 4
- Swap Space addition. 5
- Run Below commands to add 2 GB swap space with filesystem. 5
- Create the top level directory for the Oracle user, change the ownership, and set privileges: 5
- Download Oracle software. 6
- Create response files to server at /u01 location. 6
- Installation. 6
- Now run the ‘root’ scripts as the root user: 8
- CREATING A SILENT DATABASE. 9
- Set your environment: 9
Oracle database is one of the most widely used relational database management systems (RDBMS) in enterprise environments. Developed, maintained, and supported by Oracle Corporation, this RDBMS is often installed on top of a flavor of Enterprise Linux (RHEL, CentOS, or Scientific Linux). This makes for a very robust operating system – database choice.
In this Document, I will explain how to install Oracle 12c Release 2 on a RHEL/CentOS 7 GUI server.
Additionally, please note that an Oracle account is required to download the Oracle Database 12c installation file (3.2 GB). Don’t worry about this, though, as you can create an account for free.
Finally, make sure your server has at least 2 GB of RAM and 30 GB of available disk space. These hardware requirements are safe for a testing environment such as ours, but will need to increase if you consider using Oracle in production
To begin, make sure that all the packages currently installed on your RHEL/CentOS 7system 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
wget –no-check-certificate https://public-yum.oracle.com/public-yum-ol7.repo
wget –no-check-certificate https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
yum -y install oracle-rdbms-server-12cR1-preinstall
# 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.
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
and apply them:
# sysctl -p
# sysctl -a
Set the limits for oracle in /etc/security/limits.conf file.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Add minimum 2 GB Swap space
sudo install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=2048k
echo “/swapfile swap swap auto 0 0” | sudo tee -a /etc/fstab
sudo sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
mkdir –p /u01
chown oracle:dba /u01 -R
chmod 775 /u01
Download the Oracle Database 12c installation file (3.2 GB) and place under /u01/install_files
and unzip it
chown oracle:dba /u01 -R
chmod 775 /u01
At this point, we are ready to begin the initial software installation. As the downloaded file was unzipped, a directory called database was created under your current directory.
Create below response files at server
The command to run the Oracle home in silent mode (running from the database directory) is:
/runInstaller -silent -responseFile /u01/db_install.rsp
Note that a common mistake is to put a ‘=’ after –responseFile. Do not do this, it will cause an error.
The output of a successful installation will look like this:
[oracle@sovmc201 database]$ ./runInstaller -silent -responseFile /home/oracle/database/db_install.rsp
Starting Oracle Universal Installer…
Checking Temp space: must be greater than 500 MB. Actual 66020 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16379 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-11-02_03-04-27PM. Please wait …[oracle@sovmc201 database]$ You can find the log of this install session at:
The installation of Oracle Database 12c was successful.
Please check ‘/u01/app/oraInventory/logs/silentInstall2017-11-02_03-04-27PM.log’ for more details.
As a root user, execute the following script(s):
Successfully Setup Software.
[root@sovmc201 ~]# cd /u01/app/oraInv*
[root@sovmc201 oraInventory]# ls
ContentsXML logs oraInst.loc orainstRoot.sh oui
[root@sovmc201 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.
[root@sovmc201 oraInventory]# cd /u01/app/oracle/product/126.96.36.199/dbhome_1
[root@sovmc201 dbhome_1]# ./root.sh
Check /u01/app/oracle/product/188.8.131.52/dbhome_1/install/root_sovmc201.localdomain_2017-11-02_15-12-34-541423307.log for the output of root script
You have now installed Oracle using the silent install method, and have also cloned the Oracle home.
The next step is the silent database creation. This is a fairly straightforward process, and very similar to the Oracle home installation process. First, find the file dbca.rsp and copy it to a new location. The dbca.rsp file will be in the same directory as the db_install.rsp file.
Now Create Database with response file created under /u01 during installation
[oracle@sovmc201 u01]$ dbca -silent -createDatabase -responseFile dbca.rsp
Copying database files
Creating and starting Oracle instance
Completing Database Creation
Executing Post Configuration Actions
Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/silent/silent.log” for further details.
[oracle@sovmc201 u01]$ ps -ef |grep pmon
oracle 5137 1 0 20:26 ? 00:00:00 ora_pmon_silent
oracle 5507 3552 0 20:26 pts/2 00:00:00 grep –color=auto pmon
[oracle@sovmc201 u01]$ . oraenv
ORACLE_SID = [oracle] ? silent
The Oracle base has been set to /u01/app/oracle
In this article I described Oracle 12C release 2 Installation, creating a database home and creating a new database using the silent option.