About HOST:
Windows 7 64bits with 8GB
RAM + Oracle VIRTUALBOX 4.3.6
About Virtual Machines:
Virtual Machine Names:
lnxrac121 and lnxrac122
SO:
Oracle Linux Server 6.4 -
64bits
Disks:
lnxrac121.vdi with 20gb = SO
Installation
dsku01.vdi with 20gb = /u01 (grid installation)
dsku02.vdi with 20gb = /u02 (oracle installation)
dsku03.vdi with 20gb = /u03 (multiuse filesystem for
unzip binaries/backups/etc)
dskswap.vdi with 10gb = swap
SO Installation Type:
Basic Installation with
graphical interface
Network:
2 Adapters in Bridged Mode -
eth0 and eth1 (required
for RAC)
1 Adapter in NAT Mode (not
required for RAC, internet access only)
Oracle installation files, downloaded from
Oracle:
unzip
linuxamd64_12c_grid_1of2.zip
unzip
linuxamd64_12c_grid_2of2.zip
unzip
linuxamd64_12c_database_1of2.zip
unzip
linuxamd64_12c_database_2of2.zip
Oracle Grid-Infrastructure Installation
To Configure yum-repository (if necessary)
http://public-yum.oracle.com/
SO Packages - Prerequisites
yum install
oracle-rdbms-server-12cR1-preinstall -y
yum install kmod-oracleasm
-y
yum install
oracleasm-support -y
yum install oracleasmlib -y
yum install binutils -y
yum install compat-libcap1
-y
yum install
compat-libstdc++-33 -y
yum install
compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686
-y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686
-y
yum install libstdc++-devel
-y
yum install
libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686
-y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel
-y
-- Grid
infraestructure RPM inside GRID installation directory (unzipped)
cd /u03/medias/grid/grid/rpm
(sample path)
# rpm -Uvh cvuqdisk*
Configure Kernel Parameters
vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100
128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax =
4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range
= 9000 65500
update kernel
parameters(online)
/sbin/sysctl -p
Configure Limits
vi /etc/security/limits.conf
oracle soft
nofile 1024
oracle hard
nofile 65536
oracle soft
nproc 2047
oracle hard
nproc 16384
oracle soft
stack 10240
oracle hard
stack 32768
grid soft
nofile 1024
grid hard
nofile 65536
grid soft
nproc 2047
grid hard
nproc 16384
grid soft
stack 10240
grid hard
stack 32768
Disable Firewall
vi /etc/selinux/config
Set: SELINUX=permissive
Disable IPTABLES
# service iptables stop
# chkconfig iptables off
Configure NTPD
vi /etc/sysconfig/ntpd
change
OPTIONS="-u ntp:ntp -p
/var/run/ntpd.pid"
to
OPTIONS="-x -u ntp:ntp
-p /var/run/ntpd.pid"
Restart ntpd service
# service ntpd restart
Groups, Users and Directories
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 asmdba
groupadd -g 54326 dgdba
groupadd -g 54327 kmdba
groupadd -g 54328 asmadmin
groupadd -g 54329 asmoper
useradd -u 54322 -g oinstall
-G asmadmin,asmdba,dba grid
useradd -u 54321 -g oinstall
-G dba,backupdba,dgdba,kmdba,asmdba,asmoper oracle
grid directories
mkdir -p /u01/app/grid
mkdir -p
/u01/app/12.1.0.1/grid
chown -R grid:oinstall /u01
chmod -R 775 /u01/
oracle directories
mkdir -p /u02/app/oracle
mkdir -p
/u02/app/oracle/product/12.1.0.1/db_1
chown oracle:oinstall
/u02/app/oracle
chmod -R 775 /u02/
multiuse directory
chown oracle:oinstall /u03/
chmod -R 775 /u03/
Network Configuration
ETH0 NODE lnxrac121 - 192.168.0.101
ETH0 NODE lnxrac122 - 192.168.0.102
ETH1 NODE lnxrac121 - 192.168.1.101
ETH1 NODE lnxrac122 - 192.168.1.102
Configure Hosts file
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
# RAC12C - Public
192.168.0.101 lnxrac121.localdomain lnxrac121
192.168.0.102 lnxrac122.localdomain lnxrac122
# RAC12C - Private
192.168.1.101 lnxrac121-priv.localdomain lnxrac121-priv
192.168.1.102 lnxrac122-priv.localdomain lnxrac122-priv
# RAC12C - Virtual
192.168.0.103 lnxrac121-vip.localdomain lnxrac121-vip
192.168.0.104 lnxrac122-vip.localdomain lnxrac122-vip
# RAC12C - SCAN
192.168.0.105 lnxrac12-scan.localdomain lnxrac12-scan
Configure TMPFS
Configure profile for oracle
.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export
ORACLE_HOSTNAME=lnxrac121.localdomain
export ORACLE_UNQNAME=cdb12
export GRID_BASE=/u01/app/grid
export
GRID_HOME=/u01/app/12.1.0.1/grid
export
ORACLE_BASE=/u02/app/oracle
export
ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/db_1
export ORACLE_SID=cdb12
export ORACLE_TERM=xterm
export
BASE_PATH=/usr/sbin:$PATH
export
PATH=$ORACLE_HOME/bin:$BASE_PATH
export
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Configure profile for grid
.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=lnxrac121.localdomain
export ORACLE_UNQNAME=+ASM1
export
ORACLE_BASE=/u01/app/grid
export
ORACLE_HOME=/u01/app/12.1.0.1/grid
export ORACLE_SID=+ASM1
export ORACLE_TERM=xterm
export
BASE_PATH=/usr/sbin:$PATH
export
PATH=$ORACLE_HOME/bin:$BASE_PATH
export
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Configure User Equivalence for grid and oracle
Users
NODE lnxrac121
su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa
su - oracle
cd ~/.ssh
cat id_rsa.pub >>
authorized_keys
scp authorized_keys
lnxrac122:/home/oracle/.ssh/
NODE lnxrac122
su - oracle
cd ~/.ssh
cat id_rsa.pub >>
authorized_keys
scp authorized_keys
lnxrac121:/home/oracle/.ssh/
OR
Use /sshUserSetup.sh inside grid
installation directory
Configure shared disks for Oracle Virtual Box
Shutdown Virtual Machines
cd /d C:\Program Files\Oracle\VirtualBox
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm01.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm02.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm03.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm04.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm05.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm06.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd --filename
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm07.vdi --size 1024 --format VDI
--variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm08.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm09.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm10.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm11.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm12.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm13.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm14.vdi --size 1024
--format VDI --variant Fixed
VBoxManage createhd
--filename C:\OracleVirtualBox\asmdisks\12c\cdb12\asm15.vdi --size 1024
--format VDI --variant Fixed
# Connect them to the VM.
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 5 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm01.vdi --mtype shareable
VBoxManage storageattach lnxrac121
--storagectl "SATA" --port 6
--device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm02.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 7 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm03.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 8 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm04.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 9 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm05.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 10 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm06.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 11 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm07.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 12 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm08.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 13 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm09.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 14 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm10.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 15 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm11.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 16 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm12.vdi --mtype shareable
VBoxManage storageattach lnxrac121
--storagectl "SATA" --port 17 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm13.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 18 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm14.vdi --mtype shareable
VBoxManage storageattach
lnxrac121 --storagectl "SATA" --port 19 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm15.vdi --mtype shareable
# Make shareable.
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm01.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm02.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm03.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm04.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm05.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm06.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm07.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm08.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm09.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm10.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm11.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm12.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm13.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm14.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm15.vdi --type shareable
# Connect them to the VM.
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 5 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm01.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 6 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm02.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 7 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm03.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 8 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm04.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 9 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm05.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 10 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm06.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 11 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm07.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 12 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm08.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 13 --device 0 --type hdd --medium
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm09.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 14 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm10.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 15 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm11.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 16 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm12.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 17 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm13.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 18 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm14.vdi --mtype shareable
VBoxManage storageattach
lnxrac122 --storagectl "SATA" --port 19 --device 0 --type hdd
--medium C:\OracleVirtualBox\asmdisks\12c\cdb12\asm15.vdi --mtype shareable
# Make shareable.
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm01.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm02.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm03.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm04.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm05.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm06.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm07.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm08.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm09.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm10.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm11.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm12.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm13.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm14.vdi --type shareable
VBoxManage modifyhd
C:\OracleVirtualBox\asmdisks\12c\cdb12\asm15.vdi --type shareable
Startup Virtual Machines
Partitioning Disks on Linux (Fdisk)
# fdisk /dev/sdf until sdt
default answers to fdisk:
n / p / 1 / enter / enter /
w
Configure ASM
Create ASM DISKS
Execute Cluster Verification Utility
Cluster Verification Utility /etc/resolv.conf Error
This error occur when configure SCAN using
/etc/hosts AND NOT DNS.
In this case, ignore this error.
INSTALL ORACLE
GRID-INFRASTRUCTURE
cd /u03/medias/grid/grid
./runInstaller
Ignore this error
INSTALL ORACLE DATABASE
cd /u03/medias/db/database
./runInstaller
Nenhum comentário:
Postar um comentário