Oracle Database 12cR2 Installation in RHEL 7.4

Wesley13
• 阅读 557

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Description:

This article is about Oracle Database 12cR2 Installation in RHEL 7.4. In this article we are going to see all the prerequisite, oracle binary installation, post installation and database creation  to be done for Oracle 12cR2 Database.

Note:

The Hardware configuration for the server with memory of 8GB, swap 8GB and total hard disk capacity used is 250GB.

Kindly refer Here for RHEL 7.4 Installation in VMWare.

Pre-Install:

Step 1:

Change the hostname in the below file using any text editor if needed and reboot the server:

# cat /etc/hostname
prod101.oracledbwr.com

# shutdown -r now

Check the hostname once the server rebooted

# hostname

# cat /etc/hosts
192.168.1.211 prod101.oracledbwr.com prod101

Step 2:

Using any text editor, create or edit the /etc/sysctl.d/97-oracle-database-sysctl.conf file, and add or edit lines similar to:

# cat /etc/sysctl.d/97-oracle-database-sysctl.conf
kernel.sem = 250 32000 100 128
kernel.shmall = 2097152                #shmall 40 percent of the size of physical memory in pages /proc/sys/kernel/shmall
kernel.shmmax = 4294967296   #shmmax Half the size of physical memory in bytes. Here we have 8GB of RAM
kernel.shmmni = 4096
kernel.panic_on_oops = 1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576

To change the current values of the kernel parameters without reboot of server, execute the below command:
# /sbin/sysctl –system

Review the output. If the values are incorrect, edit the /etc/sysctl.d/97-oracle-database-sysctl.conf file, then enter this command again.

Confirm that the values are set correctly:
# /sbin/sysctl -a

Step 3:

Add the following lines to a file called “/etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf” file:

# cat /etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728

Step 4:

The following packages are listed as required, including the 32-bit version of some of the packages. Many of the packages should be installed already.

binutils-2.23.52.0.1-12.el7 (x86_64)
compat-libcap1-1.10-3.el7 (x86_64)
glibc-2.17-36.el7 (i686)
glibc-2.17-36.el7 (x86_64)
glibc-devel-2.17-36.el7 (i686)
glibc-devel-2.17-36.el7 (x86_64)
ksh
libaio-0.3.109-9.el7 (i686)
libaio-0.3.109-9.el7 (x86_64)
libaio-devel-0.3.109-9.el7 (i686)
libaio-devel-0.3.109-9.el7 (x86_64)
libX11-1.6.0-2.1.el7 (i686)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (i686)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-1.el7 (i686)
libXi-1.7.2-1.el7 (x86_64)
libXtst-1.2.2-1.el7 (i686)
libXtst-1.2.2-1.el7 (x86_64)
libgcc-4.8.2-3.el7 (i686)
libgcc-4.8.2-3.el7 (x86_64)
libstdc++-4.8.2-3.el7 (i686)
libstdc++-4.8.2-3.el7 (x86_64)
libstdc++-devel-4.8.2-3.el7 (i686)
libstdc++-devel-4.8.2-3.el7 (x86_64)
libxcb-1.9-5.el7 (i686)
libxcb-1.9-5.el7 (x86_64)
make-3.82-19.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64) (for Oracle RAC and Oracle Clusterware)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-1.el7 (x86_64)

Verify the installed RPM’s by executing the following command:

# rpm -q binutils compat-libcap1 glibc-2.17 glibc-devel-2.17 ksh libaio libaio-devel libX11 \
libXau libXi libXtst libgcc libstdc++- libstdc++-devel libxcb make net-tools smartmontools sysstat

Step 5:

Create the required groups for Oracle Database 12cR2 Installation

# /usr/sbin/groupadd -g 54321 oinstall
# /usr/sbin/groupadd -g 54322 dba
# /usr/sbin/groupadd -g 54323 oper
# /usr/sbin/groupadd -g 54324 backupdba
# /usr/sbin/groupadd -g 54325 dgdba
# /usr/sbin/groupadd -g 54326 kmdba
# /usr/sbin/groupadd -g 54327 asmdba
# /usr/sbin/groupadd -g 54328 asmoper
# /usr/sbin/groupadd -g 54329 asmadmin
# /usr/sbin/groupadd -g 54330 racdba

Add “oracle” user with appropriate primary and secodary groups below

# /usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,asmoper,asmadmin oracle
# passwd oracle

Step 6:

Create oraInst.loc file to mention the group of inventory location

# cat /etc/oraInst.loc
inventory_loc=/oradb/app/oraInventory
inst_group=oinstall

Create necessary directories for Oracle Binaries installation and provide appropriate permissions:

mkdir -p /oradb/app/oraInventory
mkdir -p /oradb/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /oradb
chmod -R 775 /oradb

Step 7:

Set secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows

# cat /etc/selinux/config
SELINUX=permissive

Once the change is complete, restart the server or run the following command.

# setenforce Permissive

Step 8:

If we need to disable firewall in linux do the following:

# systemctl stop firewalld
# systemctl disable firewalld

Step 9:

As root user execute the following command:

xhost +

Step 10:

Login as oracle user set the following entry in .bash_profile

# su – oracle
# cat .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export LC_ALL=C
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Create an environment file for the database to be created with the following variables:

# cat /home/oracle/prod.env

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=prod101.oracledbwr.com
export ORACLE_UNQNAME=PROD_PROD1
export ORACLE_BASE=/oradb/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=PROD
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Oracle Installation:

Before starting the installation by “runInstaller” from the unzipped “linuxx64_12201_database.zip”, remember to set the display variable or “xhost +” as oracle user.

# su – oracle

#xhost +

Note:

Oracle as two options during the binary installation, first option is to install binary and create a database during the installation and the the second option is to install only the binaries. Here, we are going with the second option.

Step 1:

# pwd

/home/oracle

# unzip linuxx64_12201_database.zip

cd database

./runInstaller

Once, runInstaller is executed, the below GUI will started for Oracle 12cR2 Installation. In the first empty box provide your E-mail ID if you wish to receive updates from oracle, else uncheck and press “Next”.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 2:

As I said already, we are installing only the oracle binaries now. Hence, select “Install database software only” and press “Next”.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 3:

Since, we are going to install a standalone database, select option 1.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 4:

Select the appropriate option as per your licensing in the below screen and press “Next”.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 5:

Set the ORACLE_BASE and ORACLE_HOME directories for oracle binary installation as we already created during the Pre-install.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 6:

Select the appropriate groups created during the pre-install in the below screen and press “Next”.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 7:

Once, the pre-checks has been completed without any failures, start the installation by “Install” in the below screen.

Oracle Database 12cR2 Installation in RHEL 7.4

See the progress of the oracle binaries installation below.

Oracle Database 12cR2 Installation in RHEL 7.4

Post-Install:

Once the binaries are installed, when the below screen apprears run the “root.sh” from the newly installed ORACLE_HOME directory from the terminal and press ”OK” and “Close” the GUI from the next screen.

# /oradb/app/oracle/product/12.2.0.1/db_1/root.sh

Oracle Database 12cR2 Installation in RHEL 7.4

Database Creation:

Once the oracle binaries are installed successfully, run the environment file which we created already during pre-install and start dbca for Database creation.

Step 1:

# pwd

/home/oracle

# . prod.env

# dbca

Here, since we are create a database for the first time in this server, almost all options are disabled except create database.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 2:

Select “Advanced Configuration” to create database custom configuration options like location of the database files, SGA & PGA and other parameters of the database.

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Step 3:

Provide the Global database name and SID of the database. Also, uncheck “Create as Container database” since we create a normal database.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 4:

If you want place the datafiles in different directory other the default location, select option 2 and provide the directory.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 5:

Check “Specify Fast Recovery Area” to place the backups and select “Enable archiving”. Also, I am specifying custom location to place the archive logs. So, select “Edit archive mode parameters” and provide the location.

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Step 6:

Provide the listener name and port# in the below screen.

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Step 7:

Provide the appropriate SGA & PGA, processes, characterset from the below GUI.

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Step 8:

Configure Enterprise Manager if needed, else uncheck and press “Next”.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 9:

Provide the password for administrative accounts.

Oracle Database 12cR2 Installation in RHEL 7.4

Step 10:

Select “Create database” option and “All Initialization Parameters” to check the parameters of the database.

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Step 11:

Click on Finish to start the database creation.

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Oracle Database 12cR2 Installation in RHEL 7.4

Catch Me On:- Hariprasath Rajaram

LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter:  https://twitter.com/hariprasathdba

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
待兔 待兔
4个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Wesley13 Wesley13
3年前
RAC环境单实例启动数据库收到ORA
     在RAC环境中,如果你在没有启动节点的集群服务的情况下单实例启动数据库,将收到类似如下的报错:\oracle@rhel1u01\$sqlSQL\Plus:Release10.2.0.5.0ProductiononTueApr215:00:272013Copyright(
Wesley13 Wesley13
3年前
Oracle Database 12c Installation on CentOS 7
OracleDatabase12cInstallationonCentOS7Contents1.Introduction(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwi
Stella981 Stella981
3年前
Can't locate Switch.pm in INC的解决
rhel7.4上对oracle11.2.0.4打psu,直接就报这个错误:\root@hisdb1grid\/u01/app/grid/product/11.2.0/grid/OPatch/opatchauto/u01/setup/psu/26635745/ocmrf/u01/setup/psu/ocm.rspCan'tloc
Stella981 Stella981
3年前
DOIS 2019 DevOps国际峰会北京站来袭~
DevOps国际峰会是国内唯一的国际性DevOps技术峰会,由OSCAR 联盟指导、DevOps时代社区与高效运维社区联合主办,共邀全球80余名顶级专家畅谈DevOps体系与方法、过程与实践、工具与技术。会议召开时间:2019070508:00至2019070618:00结束会议召开地点:北京主办单位:DevOps
Stella981 Stella981
3年前
Android蓝牙连接汽车OBD设备
//设备连接public class BluetoothConnect implements Runnable {    private static final UUID CONNECT_UUID  UUID.fromString("0000110100001000800000805F9B34FB");
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
10个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这