User Tools

Site Tools


oracle:install

Oracle ASM

https://www.oracle.com/linux/downloads/linux-asmlib-rhel7-downloads.html https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/kmod-oracleasm-2.0.8-28.0.1.el7.x86_64.rpm

yum install sg3_utils -y

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/tdprc/preparing-your-cluster.html

Set OS Limits

/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1001 dba
/usr/sbin/groupadd -g 1002 asmdba

/usr/sbin/useradd -u 1100 –g oinstall -G dba,asmdba -d /home/grid -r grid
/usr/sbin/useradd -u 1200 –g oinstall -G dba,asmdba -d /home/oracle -r oracle

# grid
ORACLE_HOME=/u01/app/12.1.0/grid; export ORACLE_HOME
mkdir -p /u01/app/12.1.0/grid
chown -R grid:oinstall /u01/app/12.1.0/grid

# db
mkdir -p /u01/app/oracle/
chown -R oracle:oinstall /u01/app/oracle/
chmod -R 775 /u01/app/oracle/

You can use an Oracle home directory created in the local file system, for example, /u01/app/oracle/product/12.1.0/dbhome_1. The same directory must exist on every node in the cluster. You do not have to create these directories before installation. By default, the installer suggests a subdirectory of the Oracle base directory for the Oracle home.

Time Synchronization

ntp must use -x option (don't go back in time)
/etc/ntp.conf

slewalways yes

Create loopback raw files (not required)

mkdir /asmfs
dd if=/dev/zero of=/asmfs/disk1 bs=1024k count=30000
dd if=/dev/zero of=/asmfs/disk2 bs=1024k count=30000
dd if=/dev/zero of=/asmfs/disk3 bs=1024k count=30000

chown -R grid:asmdba /asmfs
chmod -R 660 /asmfs

/etc/init.d/loopback

#!/bin/bash
#
# chkconfig: 2345 18 18
# description: Loopback

case "$1" in
  start)
/sbin/losetup /dev/loop1 /asmfs/disk1
/sbin/losetup /dev/loop2 /asmfs/disk2
/sbin/losetup /dev/loop3 /asmfs/disk3
raw /dev/raw/raw1 /dev/loop1
raw /dev/raw/raw2 /dev/loop2
raw /dev/raw/raw3 /dev/loop3
chown -R oracle:oinstall /dev/raw/*
touch /var/lock/subsys/loopback
;;
  stop)
/sbin/losetup -d /dev/loop1
/sbin/losetup -d /dev/loop2
/sbin/losetup -d /dev/loop3
;;
esac
chown -R oracle:oinstall /dev/raw/*
fdisk create partition
oracleasm createdisk < disk label > /dev/mapper/< alias >< partition >

Oratab

SID:/u01/app/oracle/product/11.2.0/dbhome_1:Y
+ASM:/u01/app/oracle/product/11.2.0/grid:N

Discover ASM in RAC

/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm listdisks

Resize ASM

/etc/init.d/oracleasm listdisks
/etc/init.d/oracleasm createdisk VOLx /dev/raw/raw2
ALTER DISKGROUP DATA ADD DISK 'ORAPL:VOLx';

Oracle bash profile

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/opt/oracle/product/12.1.0/dbhome_1/bin

export PATH
export ORACLE_HOME=/opt/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=ORAPL

Turn off audit

ALTER SYSTEM SET AUDIT_TRAIL=NONE SCOPE=SPFILE;

SAN

Use the 512B sector size when exporting volumes to initiators. If you need to export LUNs with a 4KB sector size, use Oracle or third-party-provided ASMLIB support packages.

oracle/install.txt · Last modified: 2021/02/23 16:07 by Jan Forman