软件环境
l
l
l
用户组和文件系统配置 |
|
|
|
|
|
软件组件 |
用户 |
主组 |
辅助组 |
主目录 |
软件目录 |
Grid Infra |
grid |
oinstall |
dba |
/oracle/grid |
/oracle/grid |
检查必要的软件包
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
glibc-2.12-1.7.el6 (x86_64)
ksh-*.el6
(x86_64)
libaio-0.3.107-10.el6 (x86_64)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
make-3.81-19.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6 (x86_64)
sysstat-9.0.4-11.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (i686)
glibc-2.12-1.7.el6 (i686)
glibc-devel-2.12-1.7.el6 (i686)
libaio-0.3.107-10.el6 (i686)
libaio-devel-0.3.107-10.el6 (i686)
libgcc-4.4.4-13.el6 (i686)
libstdc++-4.4.4-13.el6 (i686)
libstdc++-devel-4.4.4-13.el6 (i686)
elfutils-libelf-devel-0.97
网络需求(两节点均要执行)
l
l
l
l
public IP,VIP和private IP,scan vip写入/etc/hosts文件
192.168.56.101
192.168.56.103
10.10.10.17
192.168.56.105
192.168.56.102
192.168.56.104
10.10.10.18
基本参数设置(两节点均要执行)
编辑/etc/sysctl.conf 添加如下内容:
kernel.shmall = 8388608
kernel.shmmax = 17179869184
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
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
/sbin/sysctl –p
编辑/etc/pam.d/login 添加如下内容:
vi /etc/pam.d/login
session
编辑vi /etc/profile添加如下内容:
if [ /$USER = "oracle" ] || [ /$USER = "grid" ]; then
fi
创建用户,组(两节点均要执行)
要求
用户shell限制(两节点均要执行)
编辑/etc/security/limits.conf 添加如下内容:
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid ssh信任关系设置
设置前先修改ssh配置文件参数:
grid用户:
node1:
[grid @ node1~]$
ssh-keygen -t
rsa
[grid @ node1~]$ ssh-keygen -t dsa
[grid @ node1~]$ cd .ssh
[grid @ node1.ssh]$ cat *.pub >
authorized_keys
node2:
[grid @ node2~]$
ssh-keygen -t
rsa
[grid @ node2~]$ ssh-keygen -t dsa
node1:
[grid@node1 .ssh]$ scp authorized_keys
node2:/home/grid/.ssh/
//选yes
node2:
[grid @ node2~]$ cd .ssh
[grid@node2 .ssh]$ cat *.pub >> authorized_keys
[grid@node2 .ssh]$ scp authorized_keys
node1:/home/grid/.ssh/
验证ssh用户等效性
node1:
第一次选择yes
[grid @ node1 ~]$ ssh node1 date
[grid @ node1 ~]$ ssh node2 date
[grid @ node1 ~]$ ssh node1-priv date
[grid @ node1 ~]$ ssh node2-priv date
切换至node 2 执行
[grid @ node2 ~]$ ssh node1 date
[grid @ node2 ~]$ ssh node2 date
[grid @ node2 ~]$ ssh node1-priv date
[grid @ node2 ~]$ ssh node2-priv date
//如果不需要输入密码,则配置成功
环境变量设置
node1
export ORACLE_BASE=/oracle/base
export ORACLE_HOME=/oracle/grid
export ORACLE_SID=+ASM1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
node2
export ORACLE_BASE=/oracle/base
export ORACLE_HOME=/oracle/grid
export ORACLE_SID=+ASM2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
创建软件安装目录
# mkdir -p /oracle
# chown -R oracle:oinstall /oracle
# chmod -R 775 /oracle
安装Grid Infrastructure
p13390677_112040_Linux-x86-64_3of7.zip
unzip p13390677_112040_Linux-x86-64_3of7.zip
su – grid
$ export LANG=en_US
$ ./runInstaller
安装截图
出来下面安装界面,选择最下面的Skip software updates,然后选next
选择第一个安装和配置集群环境,next
选择第二个高级安装,next
选上添加简体中文,next
此处集群名自己取,SCAN名需要和/etc/hosts中的scan ip别名一致,端口默认,不选GNS,next
添加busrac2节点,并进行ssh测试,next
配置网络接口:选对网卡类型,next
存储选择:选择ASM,next
建立OCRVOTE盘,选择3块2G的盘 next
设置密码:next
安装路径指定:选择ORACLE_BASE和ORACLE_HOME,根据自己设置来,建议ORACLE_BASE不和RDBMS软件ORACLE_BASE不是同一个,方便管理
检测结果:
- 查看检测结果,如果fixable为yes则可以通过按fix&check again,执行脚本来修复(不保证一定可以修复),如果不能,则只能手工修复,经检查,可以忽略,选择ignore all继续安装
执行脚本。
注意:
l
l
Ø
Ø
安装完成:
[root@node1 etc]# /oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@node1 etc]# /oracle/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on 'node1'
CRS-2676: Start of 'ora.mdnsd' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'node1'
CRS-2676: Start of 'ora.gpnpd' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'node1'
CRS-2672: Attempting to start 'ora.gipcd' on 'node1'
CRS-2676: Start of 'ora.gipcd' on 'node1' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'node1'
CRS-2672: Attempting to start 'ora.diskmon' on 'node1'
CRS-2676: Start of 'ora.diskmon' on 'node1' succeeded
CRS-2676: Start of 'ora.cssd' on 'node1' succeeded
ASM created and started successfully.
Disk Group OCRVOTE created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk
540fb05eb3844feabfe39595
Successful addition of voting disk
5608478ff1cd4f1cbf70f9d0
Successful addition of voting disk
108c03b12f8f4f43bf047c41
Successfully replaced voting disk group with +OCRVOTE.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##
--
Located 3 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'node1'
CRS-2676: Start of 'ora.asm' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.OCRVOTE.dg' on 'node1'
CRS-2676: Start of 'ora.OCRVOTE.dg' on 'node1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@node2 etc]# /oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@node2 etc]# /oracle/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node node1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster ... succeeded