Oracle Database 12c Release 2 on Linux 7
System Setup
Parameter | Value |
OS | RHEL 7 / CentOS 7 |
vCPU | 1 |
RAM | 2 GB |
SWAP | 2GB |
/tmp | 2 GB |
/u01 | 20GB |
Prerequisites
- Login as root user or user with 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
- Prepare for Required Packages Install
Create a new file containing the package names
#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 Required 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
# 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
# vim /etc/sysconfig/selinux
SELINUX=disabled
- Disable SELINUX
# setenforce 0
setenforce: SELinux is disabled
Create User & Groups
- Create oracle user and 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
# 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
# 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
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
Running Oracle Database Installer
- Login to the GUI as oracle user
- Open the terminal window and Run oracle installer
# cd /software/database
# ./runInstaller
- Wait for Oracle installer to start
Install Oracle Database
- Step 1
Uncheck the Oracle support option
Click on "Yes" button to confirm the selection.
- Step 2
Keep the default options selected. Click on Next button
- Step 3
Select "Server Class" option. Click on Next button
- Step 4
Keep the default options selected. Click on Next button
- Step 5
Keep the default options selected. Click on Next button
- Step 6
Enter the default password for database login. Click on Next button
- Step 7
Keep the default options selected. Click on Next button
- Step 8
Let the installer perform prechecks
- Step 9
Click on the Install button to initiate the Oracle Database Install
- Step 10
Monitor the Installer progress
Wait for when prompted for running the scripts as root user
- Open a new SSH session and login as root user
- Run orainstRoot.sh Script
# /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.
- Run root.sh Script
# /u01/app/oracle/product/12.2.0/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
Oracle Trace File Analyzer (TFA - User Mode) is available at :
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/bin/tfactl
OR
Oracle Trace File Analyzer (TFA - Daemon Mode) can be installed by running this script :
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/install/roottfa.sh
- Return back to the GUI sessions to continue with Oracle Installer
- Continue with GUI Step 10
Click on the Ok button to proceed to next step
- Step 11
Install is now complete. Click on Close button to close the installer
- Return back to the SSH sessions to check status of database install
- Check Database processes are running
# ps -ef | grep pmon
oracle 24398 1 0 16:39 ? 00:00:00 ora_pmon_orcl
- Oracle Database install is now complete