Professional Documents
Culture Documents
Steps
Steps
Manual Setup
If you have not used the "oracle-database-server-12cR2-preinstall" package to
perform all prerequisites, you will need to manually perform the following setup
tasks.
Add the following lines to the "/etc/sysctl.conf" file, or in a file called
"/etc/sysctl.d/98-oracle.conf" on both nodes.
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
#######################################################
[root@rac1 ~]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
Run one of the following commands to change the current kernel parameters,
depending on which file you edited.
/sbin/sysctl -p
Log in to both Oracle RAC nodes as the oracle user account and create the following
login script
( .bash_profile ):
NOTE: When setting the Oracle environment variables for each Oracle RAC node, make
certain to assign each RAC node a unique Oracle SID. For this example, we used:
in rac-node1 : ORACLE_SID=racdb1
in rac-node2 : ORACLE_SID=racdb2
Switch to oracle user, clean and edit .bash_profile file:
# ---------------------------------------------------
# .bash_profile
# ---------------------------------------------------
# OS User: oracle
# Application: Oracle Database Software Owner
# Version: Oracle 12c Release 2
# ---------------------------------------------------
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
alias ls="ls -FA"
ORACLE_SID=racdb1; export ORACLE_SID
ORACLE_UNQNAME=racdb; export ORACLE_UNQNAME
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_HOME
ORACLE_PATH=/u01/app/common/oracle/sql
export ORACLE_PATH
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
Apart form the localhost address, the "/etc/hosts" file can be left blank, but I
prefer to put the addresses in for reference.
## public
192.168.56.101 rac1.localdomain rac1
192.168.56.102 rac2.localdomain rac2
## private
192.168.1.101 rac1-priv.localdomain rac1-priv
192.168.1.102 rac2-priv.localdomain rac2-priv
## VIP
192.168.56.111 rac1-vip.localdomain rac1.vip
192.168.56.112 rac2-vip.localdomain rac2.vip
##SCAN
#192.168.56.201 rac-scan.localdomain rac-scan
#192.168.56.202 rac-scan.localdomain rac-scan
#192.168.50.203 rac-scan.localdomain rac-scan
DNS nameserver configuration:-
Install the bind RPMs to enable the DNS services,
yum install bind-libs bind bind-utils -y
yum install bind* -y
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
/*Define your forward and reverse zone file for localdomain.com*/
zone "localdomain.com" IN {
type master;
file "forward.localdomain";
allow-update { none; };
};
zone "56.168.192.in-addr.arpa" IN {
type master;
file "reverse.localdomain";
allow-update { none; };
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Here we need to create the zone files in the name of what we have define in the
named.conf file as below.
forward.localdomain
reverse.localdomain
cp /var/named/named.localhost /var/named/forward.localdomain
cp /var/named/named.loopback /var/named/reverse.localdomain
check for the errors in zone files, before starting the DNS service. First check
the named.conf file, then check other zone files.
[root@rac1 etc]# /usr/sbin/named-checkconf -z /etc/named.conf
zone localdomain.com/IN: loaded serial 2019051001
zone 10.168.192.in-addr.arpa/IN: loaded serial 2019051001
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
chattr +i /etc/resolv.conf
To undo the above
chattr –i/etc/resolv.conf
Test It
[root@rac1 etc]# dig rac1.localdomain.com
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;rac1.localdomain.com. IN A
;; ANSWER SECTION:
rac1.localdomain.com. 86400 IN A 192.168.10.101
;; AUTHORITY SECTION:
localdomain.com. 86400 IN NS rac1.localdomain.com.
Name: localdomain.com
Address: 192.168.10.202
Name: localdomain.com
Address: 192.168.10.203
Name: localdomain.com
Address: 192.168.10.101
Name: localdomain.com
Address: 192.168.10.201
[root@rac1 etc]# nslookup rac1
Server: 192.168.10.101
Address: 192.168.10.101#53
Name: rac1.localdomain.com
Address: 192.168.10.101
Name: rac2.localdomain.com
Address: 192.168.10.102
Disable Chrony
systemctl stop chronyd
systemctl disable chronyd
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/12.2.0/dbhome_1
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01
Set Resource Limits for the Oracle Software Installation Users on both nodes
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728
On each Oracle RAC node, add or edit the following line in the /etc/pam.d/login
file, if it does not exist:
[root@rac-node1 ~]$ vi /etc/pam.d/login
session required pam_limits.so
add following lines in /etc/profile to create the ulimits for the oracle and grid
user.
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
The SCAN address is commented out of the hosts file because it must be resolved
using a DNS, so it can round-robin between 3 addresses on the same subnet as the
public IPs. The DNS can be configured on the host machine using BIND or Dnsmasq,
which is much simpler. If you are using Dnsmasq, put the RAC-specific entries in
the hosts machines "/etc/hosts" file, with the SCAN entries uncommented, and
restart Dnsmasq.
Set the size to "5 GB" and the location to "[standard] shared/asm1.vmdk".
Expand the "Advanced" section and set the adapter to "SCSI 1" and the device to
"1", then click the "Next" button.
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
scsi1.present = "TRUE"
scsi1.sharedBus = "VIRTUAL"
scsi1.virtualDev = "lsilogic"
scsi1:0.present = "TRUE"
scsi1:0.fileName = "H:\00 vm\Shared_disk\asm1.vmdk"
scsi1:0.writeThrough = "TRUE"
scsi1:0.mode = "independent-persistent"
scsi1:0.deviceType = "disk"
scsi1:0.redo = ""
scsi1:1.present = "TRUE"
scsi1:1.fileName = "H:\00 vm\Shared_disk\asm2.vmdk"
scsi1:1.writeThrough = "TRUE"
scsi1:1.mode = "independent-persistent"
scsi1:1.deviceType = "disk"
scsi1:1.redo = ""
scsi1:2.present = "TRUE"
scsi1:2.fileName = "H:\00 vm\Shared_disk\asm3.vmdk"
scsi1:2.writeThrough = "TRUE"
scsi1:2.mode = "independent-persistent"
scsi1:2.deviceType = "disk"
scsi1:2.redo = ""
scsi1:3.present = "TRUE"
scsi1:3.fileName = "H:\00 vm\Shared_disk\asm4.vmdk"
scsi1:3.writeThrough = "TRUE"
scsi1:3.mode = "independent-persistent"
scsi1:3.deviceType = "disk"
scsi1:3.redo = ""
scsi1:4.present = "TRUE"
scsi1:4.fileName = "H:\00 vm\Shared_disk\asm5.vmdk"
scsi1:4.writeThrough = "TRUE"
scsi1:4.mode = "independent-persistent"
scsi1:4.deviceType = "disk"
scsi1:4.redo = ""
scsi1:5.present = "TRUE"
scsi1:5.fileName = "H:\00 vm\Shared_disk\asm6.vmdk"
scsi1:5.writeThrough = "TRUE"
scsi1:5.mode = "independent-persistent"
scsi1:5.deviceType = "disk"
scsi1:5.redo = ""
scsi1:6.present = "TRUE"
scsi1:6.fileName = "H:\00 vm\Shared_disk\asm7.vmdk"
scsi1:6.writeThrough = "TRUE"
scsi1:6.mode = "independent-persistent"
scsi1:6.deviceType = "disk"
scsi1:6.redo = ""
scsi1:8.present = "TRUE"
scsi1:8.fileName = "H:\00 vm\Shared_disk\asm8.vmdk"
scsi1:8.writeThrough = "TRUE"
scsi1:8.mode = "independent-persistent"
scsi1:8.deviceType = "disk"
scsi1:8.redo = ""
scsi1:9.present = "TRUE"
scsi1:9.fileName = "H:\00 vm\Shared_disk\asm9.vmdk"
scsi1:9.writeThrough = "TRUE"
scsi1:9.mode = "independent-persistent"
scsi1:9.deviceType = "disk"
scsi1:9.redo = ""
scsi1:10.present = "TRUE"
scsi1:10.fileName = "H:\00 vm\Shared_disk\asm10.vmdk"
scsi1:10.writeThrough = "TRUE"
scsi1:10.mode = "independent-persistent"
scsi1:10.deviceType = "disk"
scsi1:10.redo = ""
scsi1:11.present = "TRUE"
scsi1:11.fileName = "H:\00 vm\Shared_disk\asm11.vmdk"
scsi1:11.writeThrough = "TRUE"
scsi1:11.mode = "independent-persistent"
scsi1:11.deviceType = "disk"
scsi1:11.redo = ""
scsi1:12.present = "TRUE"
scsi1:12.fileName = "H:\00 vm\Shared_disk\asm12.vmdk"
scsi1:12.writeThrough = "TRUE"
scsi1:12.mode = "independent-persistent"
scsi1:12.deviceType = "disk"
scsi1:12.redo = ""
floppy0.present = "FALSE"
. Configure ASMLib
Configuring and load the ASM kernel module. This task needs to be run on both
Oracle RAC nodes as the root user
[root@rac1 ~]# /usr/sbin/oracleasm configure –I
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
First we have to create partitions to be able to use those disks as ASM disks;
[root@rac1 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
To make the disk available on the other nodes in the cluster ( rac-node2), enter
the following command as the root on each node:
[root@rac-node2 ~]# /usr/sbin/oracleasm scandisks
Now you can test that the ASM disks were successfully created by using the
following command on both nodes in the RAC cluster as the root user account. This
command identifies shared disks attached to the node that are marked as Automatic
Storage Management disks
[root@rac-node1 ~]$ /usr/sbin/oracleasm listdisks
CRSVOL1
CRSVOL2
CRSVOL3
CRSVOL4
CRSVOL5
DATAVOL1
DATAVOL2
FRAVOL1
FRAVOL2
# Remote node.
scp ./cvuqdisk* root@ol7-122-rac2:/tmp
ssh root@ol7-122-rac2 rpm -Uvh /tmp/cvuqdisk*
exit
User Equivalence (Key-Based Authentication) Configuration on Linux
Manual User Equivalence (Key-Based Authentication) Configuration
Assuming we have a two node cluster (rac1.localdomain, rac2.localdomain), log in as
the "oracle" user and perform the following tasks on each node.
su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa # Accept the default settings.
The RSA public key is written to the ~/.ssh/id_rsa.pub file and the private key to
the ~/.ssh/id_rsa file.
Log in as the "oracle" user on rac1.localdomain, generate an "authorized_keys" file
and copy it to rac2.localdomainusing the following commands.
su - oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac2.localdomain:/home/oracle/.ssh/
Next, log in as the "oracle" user on rac2.localdomain and perform the following
commands.
su - oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac1.localdomain:/home/oracle/.ssh/
The "authorized_keys" file on both servers now contains the public keys generated
on all nodes.
To enable SSH user equivalency on the cluster member nodes issue the following
commands on each node.
ssh rac1 date
ssh rac2 date
ssh rac1.localdomain date
ssh rac2.localdomain date
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
You should now be able to SSH and SCP between servers without entering passwords.
Accept the "Configure an Oracle Standalone Cluster" option by clicking the "Next"
button.
Click the "SSH connectivity..." button and enter the password for the "oracle"
user. Click the "Setup" button to configure SSH connectivity, and the "Test" button
to test it once it is complete. Once the test is complete, click the "Next" button.
Accept the "Configure ASM using block devices" option by clicking the "Next"
button.
Select the "No" option, as we don't want to create a separate disk group for the
GIMR in this case. Click the "Next" button.
Set the redundancy to "External", click the "Change Discovery Path" button and set
the path to “ORCL:CRSVOL*". Return to the main screen and select all 8 disks.
Uncheck the "Configure Oracle ASM Filter Driver" option, then click the "Next"
button.
Passward is asm
#################################################################
After running user qquivalence
[grid@rac1 grid]$ runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose
checking response for name "rac1" from each of the name servers specified in
"/etc/resolv.conf"
checking response for name "rac2" from each of the name servers specified in
"/etc/resolv.conf"
Pre-check for cluster services setup was unsuccessful on all the nodes.
Failures were encountered during execution of CVU verification request "stage -pre
crsinst".
rac1: PRVG-13606 : chrony daemon is not synchronized with any external time
source on node "rac1".
###############################################################
After solving virbr0
[grid@rac1 grid]$ runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose
checking response for name "rac1" from each of the name servers specified in
"/etc/resolv.conf"
checking response for name "rac2" from each of the name servers specified in
"/etc/resolv.conf"
Pre-check for cluster services setup was unsuccessful on all the nodes.
Failures were encountered during execution of CVU verification request "stage -pre
crsinst".
Inatallation
Goto oracle_home /u01/app/12.2.0/grid where software extracted then
execute ./gridSetup.sh
Select the "Configure Oracle Grid Infrastructure for a New Cluster" option, then
click the "Next" button.
Accept the "Configure an Oracle Standalone Cluster" option by clicking the "Next"
button.
Enter the cluster name "raccluster", SCAN name "rac-scan" and SCAN port "1521",
then click the "Next" button.
Click the "SSH connectivity..." button and enter the password for the "grid" user.
Click the "Setup" button to configure SSH connectivity, and the "Test" button to
test it once it is complete. Once the test is complete, click the "Next" button.
Check the public and private networks are specified correctly. If the NAT interface
is displayed, remember to mark it as "Do Not Use". Click the "Next" button.
Accept the "Configure ASM using block devices" option by clicking the "Next"
button.
Select the "No" option, as we don't want to create a separate disk group for the
GIMR in this case. Click the "Next" button.
Set the redundancy to "External", click the "Change Discovery Path" button and set
the path to ORCL:*". Return to the main screen and select all 4 disks. Uncheck the
"Configure Oracle ASM Filter Driver" option, then click the "Next" button.
Password is asm
We are using a grid user and group manage both ASM, so set the groups to "asmadmin"
and click the "Next" button.
Enter the Oracle Base location "/u01/app/oracle" and click the "Next" button.
/u01/app/grid
ignore the subsequent warning about the Oracle Base not being empty by clicking the
"Yes" button.
If you want the root scripts to run automatically, enter the relevant credentials.
I prefer to run them manually. Click the "Next" button.
Wait while the prerequisite checks complete. If you have any issues use the "Fix &
Check Again" button. Once possible fixes are complete, check the "Ignore All"
checkbox and click the "Next" button. It is likely the "Physical Memory" and
"Network Time Protocol (NTP)" tests will fail for this type of installation. This
is OK.
Node 1
[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Node 2
[root@rac2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
$ ./runInstaller
[root@rac1 grid]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
$ pwd
/u01/install/12201/grid/cv
$ ls
admin cvdata cvutl remenv
$ mkdir log
$ chmod 777 log
$ ls -l | grep log
drwxrwxrwx 2 oracle oinstall 256 Oct 08 21:24 log
http://gliuoracle.blogspot.com/2017/10/oracle-grid-product-installation.html
1. First, list out the virtual bridge interfaces available on the system using the
below command.
# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.5254003008b6 yes virbr0-nic
# brctl show
bridge name bridge id STP enabled interfaces