285572001 发表于 2018-6-4 12:46:09

oracle 11G rac 安装(VMware + rhel6.3)

  闲来有空,整理下VMware workstation上oracle 11 RAC的安装

  环境:
  VMware Workstation :9.0.0 build-812388
  OS :Red Hat Enterprise Linux Server release 6.3 (Santiago)
  Oracle :11203
  

  配置环境如图所示

http://s3.51cto.com/wyfs02/M01/74/4C/wKioL1YYwhPxnoi7AAE2LSr_POE696.jpg
  磁盘 45G 分别有两块网卡 内存2.5G Swap为内存的2倍
  

VMware virtual Ethernet adapter 1    192.168.10网段
VMware virtual Ethernet adapter 8    172.10.10 网段
  详细信息如下图所示
  http://s3.51cto.com/wyfs02/M01/74/4F/wKiom1YYvpyCFK-0AAF5MYY33WU506.jpg
  1.IP规划
  
  ###eth0 public ip
  192.168.10.10   rac1
  192.168.10.20   rac2
  ###eth1 private ip
  172.10.10.10    rac1-priv
  172.10.10.20    rac2-priv
  ###virtual ip
  192.168.10.110rac1-vip
  192.168.10.120rac2-vip
  ###scan ip
  192.168.10.100rac-scan
  /etc/hosts文件编辑,添加以下内容,如图所示
  http://s3.51cto.com/wyfs02/M00/74/4C/wKioL1YYwWmAWnR0AALDhuxm53M539.jpg
  

  2.修改shm的大小
  

编辑 /etc/fstab   添加如下一行(根据主机内存进行修改,这里是3G)
shmfs    /dev/shm      tmpfs   size=3g 0
3.关闭服务

两个节点均进行操作
  # chkconfig iptables off
  # chkconfig ip6tables off
  # chkconfig postfix off
  如图所示
  http://s3.51cto.com/wyfs02/M01/74/4F/wKiom1YYwvXR27UGAAOIwxPCrJY951.jpg
  

  
  4.软件包安装检查
  执行以下命令检查所需的包是否安装
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
compat-libstdc++- \
compat-libstdc++- \
elfutils-libelf- \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc \
glibc-common \
glibc-devel \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
numactl-devel \
sysstat
  5.配置本地yum安装软件包
  

  两个节点均进行操作
  编辑/etc/yum.repos.d/local.repo,添加以下内容
  
  name=local
  baseurl=file:///mnt
  enabled=1
  gpgcheck=0
  

mount /dev/sr0 /mnt/挂载光盘,安装所需的包
选择上一步检查未安装的包,使用yum安装
yum install binutils* compat-libstdc* elfutils-libelf* gcc*glibc* ksh* libaio* libgcc* libstdc* make* numactl-devel* sysstat* compat*elfutils* unix* libXp* -y
6.创建用户、组
两个节点均需要做
  
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
groupadd asmdba
groupadd asmoper
useradd -g oinstall -Gdba,asmdba,asmadmin,asmoper grid
useradd -g oinstall -G dba,oper,asmdba oracle
echo -n oracle|passwd --stdin grid
echo -n oracle|passwd --stdin oracle
  
  7.创建软件安装目录并赋予权限
  目录规划:
Oracle Base 目录 :/oracle/db
Grid Base 目录:/oracle/grid
Grid Home 目录:/oracle/asm
创建目录
mkdir -p /oracle
mkdir -p /oracle/db
mkdir -p /oracle/grid
mkdir -p /oracle/asm
  赋予权限
chown -R grid.dba /oracle
chown -R grid.dba /oracle/asm
chown -R grid.dba /oracle/grid
chown -R oracle.dba /oracle/db
chmod -R 775 /oracle
  8.修改系统内核参数
  

8.1编辑/etc/sysctl.conf文件中加入下列参数
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
  kernel.shmmax = 5368709120
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 = 1048586
# sysctl –p 运行使其生效
  

8.2设置Shell Limits(系统资源限制)
  在/etc/security/limits.conf文件中加入下面行
oracle            soft    nproc2047
oracle             hard    nproc16384
oracle            soft    nofile 1024
oracle            hard    nofile 65536
oracle            soft    stack10240
grid            soft    nproc2047
grid            hard    nproc16384
grid            soft    nofile 1024
grid            hard    nofile 65536
grid            soft    stack10240
  

8.3修改安全限制
编辑/etc/pam.d/login文件,添加下列行
session    required   pam_limits.so
8.4修改/etc/profile
添加下列为文件
  
  if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
  ulimit -p 16384
  ulimit -n 65536
  else
  ulimit -u 16384 -n 65536
  fi
  umask 022
  fi
  

  # source /etc/profile   运行使其生效
  9.修改用户环境变量
  

9.1Grid 用户
修改节点1环境变量
  # su – grid
  $ vi .bash_profile
  export ORACLE_BASE=/oracle/grid
  export ORACLE_HOME=/oracle/asm
  export ORACLE_SID=+ASM1
  exportPATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
  exportPATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
  LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
  export LD_LIBRARY_PATH
  CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
  export CLASSPATH
$ source .bash_profile 使其生效
修改节点2环境变量
  # su – grid
  $ vi .bash_profile
  export ORACLE_BASE=/oracle/grid
  export ORACLE_HOME=/oracle/asm
  export ORACLE_SID=+ASM2
  exportPATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
  exportPATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
  LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
  export LD_LIBRARY_PATH
  CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
  export CLASSPATH
$ source .bash_profile 使其生效
9.2Oracle 用户
修改节点1环境变量
# su - oracle
$ vi .bash_profile
  export ORACLE_BASE=/oracle/db
  exportORACLE_HOME=$ORACLE_BASE/product/11.2
  export ORACLE_SID=racdb1
  exportPATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
  exportPATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
  LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
  export LD_LIBRARY_PATH
  CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
  export CLASSPATH
$ source .bash_profile 使其生效

修改节点2环境变量
# su - oracle
$ vi .bash_profile
  export ORACLE_BASE=/oracle/db
  exportORACLE_HOME=$ORACLE_BASE/product/11.2
  export ORACLE_SID=racdb2
  exportPATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
  exportPATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
  LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
  export LD_LIBRARY_PATH
  CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
  export CLASSPATH
$ source .bash_profile 使其生效

  10配置互信
10.1Grid用户互信配置
节点1
# su – grid
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa
节点2
# su – grid
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa
节点1
$ cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
$ sshgrid@rac2 cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
节点2
$ cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
$ ssh grid@rac1 cat ~/.ssh/*.pub >>~/.ssh/authorized_keys

检验在节点1节点2同时执行以下操作
  $ssh rac1 date
  $ssh rac1-priv date
  $ssh rac2 date
  $ssh rac2-priv date
10.2oracle用户互信配置
节点1
# su - oracle
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa
节点2
# su - oracle
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa
节点1
$ cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
$ ssh oracle@rac2 cat ~/.ssh/*.pub >>~/.ssh/authorized_keys
节点2
$ cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
$ ssh oracle@rac1 cat ~/.ssh/*.pub >>~/.ssh/authorized_keys
检验在节点1节点2同时执行以下操作
  $ssh rac1 date
  $ssh rac1-priv date
  $ssh rac2 date
  $ssh rac2-priv date
  11.创建共享磁盘
  

本次使用的是VMware,使用以下操作方法创建共享磁盘
D:\>cd D:\soft\VMware
D:\soft\VMware>
D:\soft\VMware>vmware-vdiskmanager.exe -c -s 2g -a lsilogic -t 2E:\vm\sharedisk
\ocr_vote.vmdk
D:\soft\VMware>vmware-vdiskmanager.exe -c -s 5g -a lsilogic -t 2E:\vm\sharedisk
\oradata.vmdk
http://s3.51cto.com/wyfs02/M02/74/4C/wKioL1YYxvGzrl9EAAFB9gSP2Ys840.jpg
  关闭两台虚拟机
  编辑虚拟机配置文件,添加刚刚创建的共享磁盘信息,修改.vmx的文件,添加以下内容 两个文件都要添加
###add by mjt
#shared disks configure
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize ="0"
diskLib.dataCacheMinReadAheadSize ="0"
diskLib.maxUnsyncedWrites = "0"
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsil.sharedBus = "VIRTUAL"
scsi1:0.present = "TRUE"
scsi1:0.mode ="independent-persistent"
scsi1:0.fileName ="E:\vm\sharedisk\ocr_vote.vmdk"
scsi1:0.deviceType = "disk"
scsi1:0.redo = ""
scsi1:1.present = "TRUE"
scsi1:1.mode ="independent-persistent"
scsi1:1.fileName ="E:\vm\sharedisk\oradata.vmdk"
scsi1:1.deviceType = "disk"
scsi1:1.redo = ""
保存之后打开虚拟机看见的是下列状态
  http://s3.51cto.com/wyfs02/M01/74/4D/wKioL1YYzAXzMjGLAABolq_7M3w813.jpg

  确保两台机器都均是这种状态   打开虚拟机进行磁盘的格式化等操作
  查看两个节点中服务器识别状态
  # fdisk /dev/sdb
  # fdisk /dev/sdc
  # fdisk -l /dev/sdb
  # fdisk -l /dev/sdc
  # partprobe
  节点2
  # fdisk -l /dev/sdb
  # fdisk -l /dev/sdc
  两个节点均要操作
  映射到裸设备
  修改/etc/udev/rules.d/60-raw.rules文件,添加以下内容
  ACTION=="add",KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
  ACTION=="add",KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
  KERNEL=="raw*",OWNER="grid",GROUP="dba",MODE="660"
  两个节点均要操作
  # partprobe
  # start_udev
  # ls -l /dev/raw/
  

  软件安装部分
  

  12.介质上传

  p10404530_112030_Linux-x86-64_1of7.zip
  p10404530_112030_Linux-x86-64_2of7.zip
  p10404530_112030_Linux-x86-64_3of7.zip
  # mkdir /soft
# chown -R grid.dba /soft/
使用grid用户上传
cluster安装
$ cd grid/
$ unzip p10404530_112030_Linux-x86-64_3of7.zip
# cd /soft/grid/rpm
# rpm -ivh cvuqdisk-1.0.9-1.rpm
# scp cvuqdisk-1.0.9-1.rpm rac2:/tmp
# rpm -ivh /tmp/cvuqdisk-1.0.9-1.rpm

$ ./runInstaller
12.1跳过软件更新

http://s3.51cto.com/wyfs02/M02/74/51/wKiom1YY1ZjzDeXmAAL2IIPrlTE613.jpg12.2选择要安装的软件类型
选择Install and Configure GridInfrastructure for a Cluster,点击“Next”

http://s3.51cto.com/wyfs02/M00/74/51/wKiom1YY1b-A4XleAAJzqye6yyA939.jpg12.3选择安装类型
选择Advanced Installation,点击“Next”
http://s3.51cto.com/wyfs02/M01/74/4E/wKioL1YY1nWh5A-CAAJdv5T2YyE632.jpg12.4选择产品语言
添加简体中文,Simplified Chinese,点击“Next”
http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY1tWDEHeUAAKOMhIPxDE158.jpg12.5设置集群名称和scan名字
http://s3.51cto.com/wyfs02/M01/74/51/wKiom1YY1vTAY2EzAAK8--WoXqQ260.jpg12.6配置集群节点信息
添加节点2的信息,名字和虚拟ip都是在hosts中配置的
http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY13KR0n4fAAPrmJxEejY025.jpg
此处就不需要再配置ssh互信了,之前已经做过配置,如果前面没有配置,此处可以进行配置,10G之前没有此选项
12.7配置网络接口

查看是否正常

http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY2HiBn8kjAALpP8VWiuQ070.jpg12.8指定OCR和vote的存储位置
http://s3.51cto.com/wyfs02/M01/74/51/wKiom1YY2RuD18YbAAKadSfQFGw257.jpg12.9定义DG名字,选择所存储的盘
http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY2Z_wwvjEAALz6InjhGk618.jpg12.10指定asm的密码
可能会提示密码强度不够,点击yes即可,next
http://s3.51cto.com/wyfs02/M01/74/51/wKiom1YY2geCD2dVAAKk6qpKZlc150.jpg12.11系统组设置选择用户组
选择dba组,出现提示,忽略即可

http://s3.51cto.com/wyfs02/M02/74/51/wKiom1YY2qmTNm5JAAKz-tryey4966.jpg12.12指定安装目录
查看是否是环境变量中设置的路径
http://s3.51cto.com/wyfs02/M01/74/4E/wKioL1YY20uBZdaVAAL8XKCNF5s168.jpg12.13建立产品清单目录
http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY2_XwLAyXAAL0pywFCuY197.jpg12.14安装前检查
http://s3.51cto.com/wyfs02/M00/74/4E/wKioL1YY3C3RdkixAAJZ_nZa5eE106.jpg12.15勾选以下警告
不影响安装,点击next
http://s3.51cto.com/wyfs02/M02/74/51/wKiom1YY3DSC2EGMAANldRx70YI781.jpg
12.17总体信息检查
检查相关配置信息是否正确
http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY3IvDSoStAAOX2AxOwZc028.jpg12.18正式安装
http://s3.51cto.com/wyfs02/M01/74/4E/wKioL1YY3MKCN0DgAAO3PTqehLg045.jpg12.19执行配置脚本
使用root用户执行以下两个脚本
http://s3.51cto.com/wyfs02/M00/74/4E/wKioL1YY3Vbif_7tAAPeivmQ5D8986.jpg
节点1
#/oracle/oraInventory/orainstRoot.sh
Changing permissions of/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions forworld.


Changing groupname of /oracle/oraInventoryto oinstall.
The execution of the script is complete.
节点2

#/oracle/oraInventory/orainstRoot.sh
Changing permissions of/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions forworld.


Changing groupname of /oracle/oraInventoryto oinstall.
The execution of the script is complete.
节点1
# /oracle/asm/root.sh
Performing root user operation for Oracle11g


The following environment variables are setas:
   ORACLE_OWNER= grid
   ORACLE_HOME=/oracle/asm


Enter the full pathname of the local bindirectory: :
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...




Creating /etc/oratab file...
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of rootscript.
Now product-specific root actions will beperformed.
Using configuration parameter file:/oracle/asm/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites duringinstallation
OLR initialization - successful
rootwallet
rootwallet cert
rootcert export
peerwallet
profile reader wallet
pawallet
peerwallet keys
pawallet keys
peercert request
pacert request
peercert
pacert
peerroot cert TP
profile reader root cert TP
paroot cert TP
peerpa cert TP
papeer cert TP
profile reader pa cert TP
profile reader peer cert TP
peeruser cert
pauser cert
Adding Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1'succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1'succeeded
CRS-2672: Attempting to start'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1'succeeded
CRS-2672: Attempting to start 'ora.cssd' on'rac1'
CRS-2672: Attempting to start 'ora.diskmon'on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1'succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1'succeeded
ASM created and started successfully.
Disk Group asmcrs 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 disk60d9d4acbefa4f35bfcac5961d035393.
Successfully replaced voting disk group with+asmcrs.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfullyreplaced
## STATE    File Universal Id                File Name Disk group
-- -----    -----------------                --------- ---------
1.ONLINE   60d9d4acbefa4f35bfcac5961d035393(/dev/raw/raw1)
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1'succeeded
CRS-2672: Attempting to start'ora.ASMCRS.dg' on 'rac1'
CRS-2676: Start of 'ora.ASMCRS.dg' on 'rac1'succeeded
Configure Oracle GridInfrastructure for a Cluster ... succeeded
节点2
# /oracle/asm/root.sh
Performing root user operation for Oracle11g
The following environment variables are setas:
   ORACLE_OWNER= grid
   ORACLE_HOME=/oracle/asm
Enter the full pathname of the local bindirectory: :
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
   Copyingcoraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of rootscript.
Now product-specific root actions will beperformed.
Using configuration parameter file:/oracle/asm/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites duringinstallation
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started inexclusive mode but found an active CSS daemon on node rac1, number 1, and isterminating
An active cluster was found during exclusivestartup, restarting to join the cluster
Configure Oracle GridInfrastructure for a Cluster ... succeeded
http://s3.51cto.com/wyfs02/M00/74/4E/wKioL1YY3pvx4p6rAAO1O_YoRUw530.jpghttp://s3.51cto.com/wyfs02/M01/74/51/wKiom1YY3o-hTZCcAAQFo6CI830631.jpg12.20安装完成
遇见以下错误,是正常的,是因为在hosts文件中存在有scan ip,只要两个节点可以ping同scan的ip即可
http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY3xHivq7bAAQR0grOGfQ591.jpghttp://s3.51cto.com/wyfs02/M00/74/4E/wKioL1YY3x3zipgHAAIdEnkQedA574.jpg安装完成,查看集群状态
http://s3.51cto.com/wyfs02/M02/74/51/wKiom1YY3zCyQdqpAAS_lCr8M0M234.jpg


13安装数据库软件
rdbms的安装
$ unzipp10404530_112030_Linux-x86-64_1of7.zip
$ unzipp10404530_112030_Linux-x86-64_2of7.zip
$ cd database/
$ ./runInstaller
13.1取消技术支持
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY4FTRUcfFAAJ9b3KMu4w981.jpg不接受软件更新
http://s3.51cto.com/wyfs02/M01/74/4E/wKioL1YY4Iuhv1QOAALNc3dyqlg840.jpg13.2选择安装类型
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY4Jvw23R-AAJeaNdF1ic166.jpg13.3安装选项选择
  选择Oracle Real Application Clusters database installation
  http://s3.51cto.com/wyfs02/M02/74/4E/wKioL1YY4PPSE63wAANBD8H35to278.jpg13.4选择产品语言
  http://s3.51cto.com/wyfs02/M00/74/4E/wKioL1YY4RqhG-tnAAKr2ew7bXM630.jpg13.5选择安装数据库类型,选择企业版
  http://s3.51cto.com/wyfs02/M00/74/52/wKiom1YY4SbAT3GOAAMOXQSC_JE150.jpg13.6安装目录选择
  查看是否和oracle用户环境变量中配置的相同
http://s3.51cto.com/wyfs02/M01/74/4E/wKioL1YY4WKy3ECrAALfIAfBjaA718.jpg13.7设置系统组
  均选择dba组
  http://s3.51cto.com/wyfs02/M00/74/52/wKiom1YY4X2AefwCAALf74ky6wE102.jpg13.8安装前检查
  
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY4bST1EwiAAImpf7bM7U796.jpg
http://s3.51cto.com/wyfs02/M01/74/4F/wKioL1YY4c-S3L-3AAMutu7bN64039.jpg
http://s3.51cto.com/wyfs02/M02/74/52/wKiom1YY4bbRx0vmAAKjGjgHiV8365.jpg
http://s3.51cto.com/wyfs02/M02/74/4F/wKioL1YY4dWh-ZAvAANJ7LT1Ka0313.jpg
  13.8执行配置脚本
  使用root用户执行以下脚本
  

  /oracle/db/product/11.2/root.sh
  http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY4fjywRAaAAN3De-xx4g390.jpg

  
节点1
#/oracle/db/product/11.2/root.sh
Performing root user operation for Oracle11g


The following environment variables are setas:
   ORACLE_OWNER= oracle
   ORACLE_HOME= /oracle/db/product/11.2


Enter the full pathname of the local bindirectory: :
The contents of "dbhome" have notchanged. No need to overwrite.
The contents of "oraenv" have notchanged. No need to overwrite.
The contents of "coraenv" have notchanged. No need to overwrite.


Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of rootscript.
Now product-specific root actions will beperformed.
Finished product-specific root actions.
#
节点2
#/oracle/db/product/11.2/root.sh
Performing root user operation for Oracle11g


The following environment variables are setas:
   ORACLE_OWNER= oracle
   ORACLE_HOME= /oracle/db/product/11.2


Enter the full pathname of the local bindirectory: :
The contents of "dbhome" have notchanged. No need to overwrite.
The contents of "oraenv" have notchanged. No need to overwrite.
The contents of "coraenv" have notchanged. No need to overwrite.


Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of rootscript.
Now product-specific root actions will beperformed.
Finished product-specific root actions.
#
安装完成
http://s3.51cto.com/wyfs02/M01/74/4F/wKioL1YY4neC6YviAAHLJZ3jauI737.jpg
14数据库创建
  14.1diskgroup创建
# su - grid
$ asmca
  选择“Disk Groups”选项,点击“Create”按钮创建ASM磁盘组,磁盘组名为DATADG1,完成后点击exit
http://s3.51cto.com/wyfs02/M02/74/52/wKiom1YY4tjQIoQPAAL2N2MeXfA760.jpg
http://s3.51cto.com/wyfs02/M02/74/4F/wKioL1YY4vPB90F3AAOy6dw4Mwc400.jpg
http://s3.51cto.com/wyfs02/M00/74/52/wKiom1YY4tqwDbipAANX2B2jKHw016.jpg
http://s3.51cto.com/wyfs02/M02/74/4F/wKioL1YY4vWTYY8kAAMnpOi8L3o678.jpg
14.2使用oracle用户创建数据库

$ dbca
http://s3.51cto.com/wyfs02/M00/74/52/wKiom1YY4yDAL0LiAAJqSB5UTGY830.jpg14.2创建一个数据库
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY40Oj-gpoAAIjiNmvr-U079.jpg14.3自定义数据库
http://s3.51cto.com/wyfs02/M01/74/4F/wKioL1YY44GCHVbZAAJhI61mDJc012.jpg14.4指定数据库名和实例名
  
http://s3.51cto.com/wyfs02/M02/74/52/wKiom1YY46TSeaKQAAMD0pXOc7g471.jpg14.5选择不安装EM
http://s3.51cto.com/wyfs02/M00/74/52/wKiom1YY4-Pi5JN6AAIMEvfKxM8453.jpg14.6设置数据库管理密码
可能会提示强度不够,忽略即可
http://s3.51cto.com/wyfs02/M00/74/4F/wKioL1YY5DDxLW_QAAIVU6Hn-E4727.jpg14.7选择数据文件存储方式
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY5DPysdfvAALNYO7_cCc259.jpg14.8不指定闪回区
http://s3.51cto.com/wyfs02/M01/74/4F/wKioL1YY5ICyyHD-AAJgIT-hJs4396.jpg14.9选择数据库组件,根据需要选择
http://s3.51cto.com/wyfs02/M02/74/4F/wKioL1YY5MGypEFBAAJsrOCFZqo148.jpg14.10配置数据库相关参数
本次根据内存2.5G进行配置
http://s3.51cto.com/wyfs02/M00/74/52/wKiom1YY5N3RmnsXAAJhPzI-kLQ901.jpg14.11字符集选择
http://s3.51cto.com/wyfs02/M00/74/4F/wKioL1YY5RLg0mJOAAMM9vEO2NY255.jpg14.12数据库文件定义
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY5RDAXJCVAAL4EFhqkUM072.jpg14.13正式安装
http://s3.51cto.com/wyfs02/M01/74/4F/wKioL1YY5VKB9KQRAAITZxHi4IM536.jpg
http://s3.51cto.com/wyfs02/M01/74/52/wKiom1YY5TmQhhy4AAK5FxbkW2k876.jpg
http://s3.51cto.com/wyfs02/M02/74/52/wKiom1YY5T2iCc4lAAG9i4c8-a0087.jpg
14.14完成安装

http://s3.51cto.com/wyfs02/M02/74/4F/wKioL1YY5XTQ6drZAAG7fGnVGQU062.jpg
14.15检查集群状态
$ crs_stat -t
Name         Type         Target    State   Host      
------------------------------------------------------------
ora.ASMCRS.dgora....up.type ONLINE    ONLINE    rac1      
ora.DATADG1.dg ora....up.type ONLINE    ONLINE    rac1      
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1      
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1      
ora.asm      ora.asm.type   ONLINE    ONLINE    rac1      
ora.cvu      ora.cvu.type   ONLINE    ONLINE    rac2      
ora.gsd      ora.gsd.type   OFFLINE   OFFLINE               
ora....network ora....rk.type ONLINE    ONLINE    rac1      
ora.oc4j       ora.oc4j.typeONLINE    ONLINE    rac2      
ora.ons      ora.ons.type   ONLINE    ONLINE    rac1      
ora....SM1.asm application    ONLINE    ONLINE    rac1      
ora....C1.lsnr application    ONLINE    ONLINE    rac1      
ora.rac1.gsd   application    OFFLINE   OFFLINE               
ora.rac1.ons   application    ONLINE    ONLINE    rac1      
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1      
ora....SM2.asm application    ONLINE    ONLINE    rac2      
ora....C2.lsnr application    ONLINE    ONLINE    rac2      
ora.rac2.gsd   application    OFFLINE   OFFLINE               
ora.rac2.ons   application    ONLINE    ONLINE    rac2      
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2      
ora.racdb.db   ora....se.type ONLINE    ONLINE    rac1      
ora.scan1.vipora....ip.type ONLINE    ONLINE    rac1      
$数据库连接
$ sqlplus system/oracle@racdb
SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 10 18:17:30 2015
Copyright (c) 1982, 2011, Oracle.All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
$ sqlplus system/oracle@racdb
SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 10 18:17:43 2015
Copyright (c) 1982, 2011, Oracle.All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>

至此,所有的安装完成,后续的操作下次继续。。。
页: [1]
查看完整版本: oracle 11G rac 安装(VMware + rhel6.3)