Sunteți pe pagina 1din 12

All steps txt file

Section 4, Lecture 39
REQUISITS
Software:
Virtual box
http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988Win.exe
Oracle linux 64bits
https://edelivery.oracle.com/linux
The course can be done with a laptop o PC with:
6G Ram at least
we'll use 2G RAM for each node
70G space free
We'll use 25 Go for OS install in each node, and 10G each for ocr and data
diskgroup
Supported Storage for RAC (GI 12c)
https://docs.oracle.com/database/121/CWLIN/storage.htm#CWLIN262
Network card:
http://docs.oracle.com/database/121/CWLIN/networks.htm#CWLIN209
Use ipv4 for interconnect as ipv6 is not supported

I Install oracle red hat linux 6.4 64bits


II Install oracle yum repo
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo
vi public-yum-ol6.repo
Enable all the repo you need
yum install oracle-validated
yum install oracleasm-support oracleasmlib oracleasm-`uname -r`
yum install oracle-rdbms-server-11gR2-preinstall
yum update
III Check rpm
rpm -qa | grep binutils-2
rpm -qa | grep compat-libstdc++-33
rpm -qa | grep elfutils-libelf-0
rpm -qa | grep elfutils-libelf-devel
rpm -qa | grep gcc-4
rpm -qa | grep gcc-c++-4
rpm -qa | grep glibc-2
rpm -qa | grep glibc-common-2

rpm -qa | grep glibc-devel-2


rpm -qa | grep glibc-headers-2
rpm -qa | grep ksh-2
rpm -qa | grep libaio-0
rpm -qa | grep libaio-devel-0
rpm -qa | grep libgcc-4
rpm -qa | grep libstdc++-4
rpm -qa | grep libstdc++-devel-4
rpm -qa | grep make-3
rpm -qa | grep sysstat-7
rpm -qa | grep unixODBC-2
rpm -qa | grep unixODBC-devel
IV Create directories
During installation, you are prompted to provide a path to a home directory to
store Oracle Grid Infrastructure for a cluster binaries. OUI installs Oracle
Clusterware
and Oracle ASM into a directory referred to as Grid_home.
Ensure that the directory path you provide meets the following requirements:
It should be created in a path outside existing Oracle homes.

It should not be located in a user home directory.


It should be created either as a subdirectory in a path where
all files can be owned by root, or in a unique path.
If you create the path before installation, then it should be owned by
the installation owner of Oracle Grid Infrastructure for a cluster
(oracle or grid), and set to 775 permissions.
GI
ORACLE_BASSE
mkdir -p /opt/app/oracle
ORACLE_HOME
mkdir -p /opt/app/12.1
RDBMS
ORACLE_BASE
Already created: /opt/app/oracle
ORACLE_HOME
mkdir -p /opt/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /opt
chmod -R 775 /opt
mkdir -p /opt/oraInventory

chown oracle:oinstall oraIventory/


chmod -R 755 oraIventory/
V Tune your linux system
Disable Selinux:
vi /etc/selinux/config
move to permissive
SELINUX=disable
Disable iptables:
service iptables stop
chkconfig iptables of
Tune NTP
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid -g"
vi /etc/sysconfig/ntpd
service ntpd restart
VI Check users groups.. Add asm groups if not present
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin

groupadd asmoper
groupadd asmdba
useradd -u 500 -g oinstall -G dba,oper,asmadmin,asmoper,asmdba oracle
VII Prepare both nodes
as root, change passwd oracle in both nodes
passwd oracle
Edit "/etc/hosts" file:
# Private
192.168.10.1 rac1-priv.localdomain rac1-priv
192.168.10.2 rac2-priv.localdomain rac2-priv
# Public
192.168.56.71 rac1.localdomain rac1
192.168.56.72 rac2.localdomain rac2
# Virtual
192.168.56.81 rac1-vip.localdomain rac1-vip
192.168.56.82 rac2-vip.localdomain rac2-vip
# SCAN
192.168.56.91 rac-scan.localdomain rac-scan
192.168.56.92 rac-scan.localdomain rac-scan

192.168.56.93 rac-scan.localdomain rac-scan


VIII Clone rac1 to rac2
Close VM
Change the MAC addresses in rac2
Download GI 12c X64_86 from oracle.com
Unzip files
IX Create the ASM disks
http://www.oracle.com/technetwork/server-storage/linux/install-082632.html
A Create the shareable disks from VM
Select rac1 VM click settings and go to storage
Go to sata, clic add => Create a new disk
Select the VM path and go 1 parent directory, create directory "storage"
create ocr1 disk, size 1G, fixed size
C:\Users\luis\VirtualBox VMs\storage\ocr1.vdi
Repeate this with disk data, 4G, fixed size
GO to File, Virtual Media Manager
select ocr and data disks, modify, shareable
Go to rac2 VM
settings=>storage Sata=> Add disk choose existing disk

start both nodes


B Format disks and map it with ASMLIB
as root
fdisk -l
localize disk 2G and 4G
sequence: n p 1 ent ent w
In both nodes:
/etc/init.d/oracleasm configure
Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
From rac1:
/etc/init.d/oracleasm createdisk OCR1 /dev/sdb1
Marking disk "OCR1" as an ASM disk: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk DATA1 /dev/sdc1

Marking disk "DATA1" as an ASM disk: [ OK ]


[root@rac1 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
DATA1
OCR1
from rac2:
[root@rac2 ~]# /etc/init.d/oracleasm configure
/etc/init.d/oracleasm scandisks
as oracle user rac1
X SSH Connectivity
Launch runInstaller and go until ssh conectivity, add oracle password
and setup
Then close installer
ssh oracle equivalence
doc for 11g
http://docs.oracle.com/cd/E11882_01/install.112/e41961/manpreins.htm#CWL
IN406
rac1 and rac2

su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa # Accept the default settings.
rac1
su - oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac2:/home/oracle/.ssh/
rac2
su - oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac1:/home/oracle/.ssh/
go to the binary directory
service ntpd restart on both nodes.
/home/oracle/Downloads/grid/runcluvfy.sh stage -pre crsinst -n RAC1,RAC2
-fixup -verbose
########## INSTALL GRAPHIC MODE ################

xclock
/home/oracle/Downloads/grid/runInstaller -silent -ignorePrereq -showProgress
-responseFile /home/oracle/grid.rsp
As a root user, execute the following script(s):
1. /opt/oraInventory/orainstRoot.sh
2. /opt/app/12.1/root.sh
Execute /opt/oraInventory/orainstRoot.sh on the following nodes:
[rac1, rac2]
Execute /opt/app/12.1/root.sh on the following nodes:
[rac1, rac2]
Run the script on the local node first. After successful completion, you can
start the script in parallel on all other nodes.
.................................................. 100% Done.
Successfully Setup Software.
As install user, execute the following script to complete the configuration.
1. /opt/app/12.1/cfgtoollogs/configToolAllCommands
RESPONSE_FILE=/home/oracle/grid.rsp
Note:
1. This script must be run on the same host from where installer was run.
2. This script needs a small password properties file for configuration
assistants that require passwords (refer to install guide documentation).

/home/oracle/Downloads/database/runInstaller -silent -ignorePrereq


-responseFile /home/oracle/db.rsp
srvctl stop service -d test
srvctl stop database -d test
srvctl stop asm -n node1-pub
srvctl stop asm -n node2-pub
srvctl stop nodeapps -n node1-pub,node1-pub2
srvctl disable instance -d test -i test1,test2
srvctl disable asm -n node1-pub
srvctl disable asm -n node2-pub
srvctl disable nodeapps -n node1-pub
srvctl disable nodeapps -n node2-pub
Browse Q&A
Continue
Go to Dashboard

S-ar putea să vă placă și