DBA强化实战系列第四期:在企业私有云vmware上部署oracle11.2.0.4 rac

    随着企业私有云的普及和发展,现在越来越多的人开始在云平台上建立大型应用。有的企业也开始把oracle rac搭建在企业私有云上面,我们也接到了这样的一个活,到现场为客户实施。现在我们就在私有云上面搭建rac的详细步骤进行说明。

    本案例是基于vmware5.1虚拟平台,操作系统采用的centos6.4搭建一个oracle11.2.0.4 rac
       
1、在虚拟机上安装操作系统,centos6.4,这个问题都不是很大

    安装的时候,特别要注意,配置dns。虽然dns不是必须的,但我们还是建议,在安装的过程中,把这个配置进去,这样可以配置多个scan-ip,便于单ip故障!
    在后面配置也没有问题,
   
主要设置如下:

[root@mytest1 etc]# cat resolv.conf
# Generated by NetworkManager
search hdjt.hdad.local
nameserver 10.10.100.8
nameserver 10.10.100.9

[root@mytest2 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=46b7400b-8087-4298-8f10-4a5532ce42b4
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=00:50:56:95:45:B8
IPADDR=10.10.92.182
PREFIX=24
GATEWAY=10.10.92.254
DNS1=10.10.100.8
DNS2=10.10.100.9
DOMAIN=hdjt.hdad.local
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"

注意:基本上配置这两个地方就没问题了,本小节中两台机器均要配置!

2、配置操作系统环境

--编辑语言环境
[root@mytest1 etc]# cd /etc/sysconfig
[root@mytest1 sysconfig]# vi i18n

#LANG="zh_CN.UTF-8"
LANG="en_US.UTF-8"
通常情况下,配置成英文环境较好。


--编辑hosts文件

[root@mytest1 bin]# vi /etc/hosts
#public ip
10.10.92.181  mytest1
10.10.92.182  mytest2

#priv ip
10.10.100.181  mytest1-private
10.10.100.182  mytest2-private

#vip ip
10.10.92.151  mytest1-vip
10.10.92.152  mytest2-vip

#scan ip
10.10.92.100      mytest-scan

--编辑系统参数文件

编辑系统参数

[root@mytest1 ~]# vi /etc/sysctl.conf
# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 4294967296


fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 19327352832
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
vm.min_free_kbytes = 102400

[root@mytest1 ~]# vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack 10240
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid hard stack 10240

这里的两个用户均需要编辑,否则在切换用户时会报错

[root@mytest1 ~]# vi /etc/selinux/config


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@mytest1 ~]# vi /etc/pam.d/login

#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
-session   optional     pam_ck_connector.so
session    required     pam_limits.so

注意:在本小节中,两台机上都进行相同的配置即可

3、安装必须的补丁包

--配置yum源
[root@mytest1 u02]# mv /etc/yum.repos.d/CentOS-Base.repo

--查看光盘挂载是否有问题
[root@mytest1 u02]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              48G  6.6G   39G  15% /
tmpfs                  16G   76K   16G   1% /dev/shm
/dev/sr0              4.1G  4.1G     0 100% /media/CentOS_6.4_Final

--编辑yum配置文件,如下所示
-bash: /etc/yum.repos.d/CentOS-Media.repo: Permission denied
[root@mytest1 u02]# vi /etc/yum.repos.d/CentOS-Media.repo

        file:///media/cdrom/
        file:///media/cdrecorder/
# CentOS-Media.repo
#
#  This repo can be used with mounted DVD media, verify the mount point for
#  CentOS-6.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c6-media [command]
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS_6.4_Final
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

以下补丁包是必须安装的
compat-libstdc++-33-3.2.3-69.el6.i686.rpm 
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
gcc-4.4.4-13.el6                          
gcc-4.4.7-3.el6.x86_64.rpm                
gcc-c++-4.4.7-3.el6.x86_64.rpm            
glibc-2.12-1.107.el6.i686.rpm             
glibc-devel-2.12-1.107.el6.x86_64.rpm     
glibc-devel-2.12-1.107.el6.i686.rpm       
ksh-20100621-19.el6.x86_64.rpm            
libgcc-4.4.7-3.el6.i686.rpm               
libgcc-4.4.7-3.el6.x86_64.rpm             
libstdc++-docs-4.4.7-3.el6.x86_64.rpm     
libstdc++-devel-4.4.7-3.el6.x86_64.rpm    
libstdc++-4.4.7-3.el6.x86_64.rpm          
libstdc++-devel-4.4.7-3.el6.i686.rpm      
libaio-0.3.107-10.el6.i686.rpm            
libaio-0.3.107-10.el6.x86_64.rpm          
libaio-devel-0.3.107-10.el6.i686.rpm      
libaio-devel-0.3.107-10.el6.x86_64.rpm    
elfutils-libelf-0.152-1.el6.i686.rpm

另外,pdksh-5.2.14-36.el5.i386.rpm,也要安装,如果找不到,也可以不安装,与ksh是冲突的!
我是两个都安装的,在预检查的时候,会提示到这个包!

注意:安装补丁包,两台机均要进行操作

4、创建rac用户组及用户  
两台机器上创建相同的用户,命令及id如下:
[root@mytest1 ~] groupadd -g 501 oinstall
[root@mytest1 ~] groupadd -g 502 dba
[root@mytest1 ~] groupadd -g 503 oper
[root@mytest1 ~] groupadd -g 504 asmadmin
[root@mytest1 ~] groupadd -g 505 asmoper
[root@mytest1 ~] groupadd -g 506 asmdba
[root@mytest1 ~] useradd -g oinstall -G dba,asmdba,oper oracle
[root@mytest1 ~] useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid

[root@mytest1 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@mytest1 ~]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.

5、建目录并授权

在两台机器上建成相同的目录

[root@mytest1 ~]# mkdir -p /u01/app/oracle/product/11.2.0/db1
[root@mytest1 ~]# mkdir -p /u01/app/grid/product/11.2.0/crs
[root@mytest1 ~]# chown -R grid:oinstall /u01/app/grid
[root@mytest1 ~]# chown -R oracle:oinstall /u01/app/oracle
[root@mytest1 ~]# chmod -R 775 /u01/app

6、编辑集群用户参数

参数编辑,要求在两台机器上分别对oracle\grid进行编辑配置
[root@mytest1 ~]# su - grid
[grid@mytest1 ~]$ vi .bash_profile

PATH=$PATH:$HOME/bin
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db1; export ORACLE_HOME
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
export PATH
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
         ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
        umask 022
fi

[root@mytest1 ~]# su - oracle
[oracle@mytest1 ~]$ vi .bash_profile
PATH=$PATH:$HOME/bin
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db1; export ORACLE_HOME
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
export PATH
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
         ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
        umask 022
fi

7、配置oracle\grid信任

--停防火墙
[root@mytest1 ~]# service iptables stop
iptables: Flushing firewall rules: [  OK  ]
iptables: Setting chains to policy ACCEPT: nat mangle filter [  OK  ]
iptables: Unloading modules: [  OK  ]
[root@mytest1 ~]# chkconfig iptables off
在两台机器上都关闭防火墙

--配置grid信任
[root@mytest1 ~]# su - grid
[grid@mytest1 ~]$ mkdir ~/.ssh
[grid@mytest1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_rsa.
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
The key fingerprint is:
55:28:6c:8b:d2:4a:ed:7b:54:70:52:7e:32:2b:71:fa grid@mytest1
The key's randomart image is:
+--[ RSA 2048]----+
|       . ....    |
|        *.o.     |
|     o o.** .    |
|    o + .=.=     |
|   . +  S..      |
|    . . .o       |
|       o  E      |
|      . .        |
|       .         |
+-----------------+
[grid@mytest1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_dsa.
Your public key has been saved in /home/grid/.ssh/id_dsa.pub.
The key fingerprint is:
64:1d:fa:6c:94:44:23:64:07:cc:01:51:52:0e:00:13 grid@mytest1
The key's randomart image is:
+--[ DSA 1024]----+
|  Eo..=OO+*      |
|   .   =o* +     |
|        = +      |
|       o +       |
|        S +      |
|         .       |
|                 |
|                 |
|                 |
+-----------------+

以上两步,分别在两台机器上进行配置

[grid@mytest1 ~]$ touch ~/.ssh/authorized_keys
[grid@mytest1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[grid@mytest1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[grid@mytest1 ~]$ ssh mytest2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'mytest2 (10.10..92.182)' can't be established.
RSA key fingerprint is 6f:ef:66:b3:32:dd:c1:19:62:b1:4c:dc:d6:cd:ed:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mytest2,10.10..92.182' (RSA) to the list of known hosts.
grid@mytest2's password:
[grid@mytest1 ~]$ ssh mytest2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
grid@mytest2's password:
[grid@mytest1 ~]$ scp ~/.ssh/authorized_keys mytest2:~/.ssh/authorized_keys
grid@mytest2's password:
authorized_keys                               100% 1988     1.9KB/s   00:00

这几步,只需要在一台机器上操作就行了

[grid@mytest1 ~]$ ssh mytest1 date
The authenticity of host 'mytest1 (10.10..92.181)' can't be established.
RSA key fingerprint is be:43:7f:84:3f:5a:8c:b9:20:43:be:8d:b4:4e:eb:b6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mytest1,10.10..92.181' (RSA) to the list of known hosts.
Fri Apr 11 16:55:02 CST 2014
[grid@mytest1 ~]$ ssh mytest2 date
Fri Apr 11 16:55:06 CST 2014
[grid@mytest1 ~]$ ssh mytest2-private date
The authenticity of host 'mytest2-private (10.10..100.182)' can't be established.
RSA key fingerprint is 6f:ef:66:b3:32:dd:c1:19:62:b1:4c:dc:d6:cd:ed:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mytest2-private,10.10..100.182' (RSA) to the list of known hosts.
Fri Apr 11 16:55:16 CST 2014
[grid@mytest1 ~]$ ssh mytest1-private date
The authenticity of host 'mytest1-private (10.10..100.181)' can't be established.
RSA key fingerprint is be:43:7f:84:3f:5a:8c:b9:20:43:be:8d:b4:4e:eb:b6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mytest1-private,10.10..100.181' (RSA) to the list of known hosts.
Fri Apr 11 16:55:22 CST 2014

--配置oracle信任

与上面的方法完全相同,就不再列举出来了

8、配置共享盘

   首先要规划一下。需要三个盘来建crsdg,每个盘分配4g,然后归档、重做日志、数据、索引、系统

这一很重要,需要关闭虚拟机,因为涉及到对虚拟机的参数的配置问题,是由图形界面配置的,我把步骤说一下:

--选中你要编辑的虚拟机,点击编辑虚拟机
--在新的界面中,点击添加
--在新的界面中,选择磁盘,点击下一步
--在新的界面中,选择创建新的虚拟磁盘,点击下一步
--在新的界面中,输入磁盘大小,选择厚置备置零,选择你的磁盘所要放置的底层存储
--在新的界面中,选择虚拟设备节点。如果系统盘选择的是scsi(0:n),那么这里建议选择1:n的模式,这样会生成一个新的scsi控制器。
--到最后完成,就建成了一个虚拟磁盘,这个需要点时间

回到上述步骤第一个界面,点击新生成的scsi控制器,可以看到scsi共享总线编辑,选择物理,虚拟磁盘可以在任何服务器上的虚拟机共享

在另一台虚拟机上共享磁盘

--选中你要编辑的虚拟机,点击编辑虚拟机
--在新的界面中,点击添加
--在新的界面中,选择磁盘,点击下一步
--在新的界面中,选择使用现有的虚拟磁盘
--在弹出来的选项框中,根据上面所选的存储及虚拟机名称,找到相应的目录,然后把磁盘添加进去
--在新的界面中,选择虚拟设备节点。这里要与上面的对应起来,保持一致。

完成了磁盘添加后,需要在配置参数中加入参数

--选中你要编辑的虚拟机,点击编辑虚拟机
--在弹出的界面中,左上角,点击选项
--在选项的范围内,点击常规
--然后你会看到配置参数
--点击配置参数,加入以下内容,分别填到每行的两个格中,有多少个盘,填多少!两台虚拟机均要添加
scsi1:0.sharing  "multi-writer"
scsi1:1.sharing  "multi-writer"
scsi1:2.sharing  "multi-writer"
scsi1:3.sharing  "multi-writer"
scsi1:4.sharing  "multi-writer"
scsi1:5.sharing  "multi-writer"

注意,要跳过scsi1:7.sharing

9、绑定裸设备

我们使用的是udev,具体操作如下:

--磁盘分区
[root@mytest1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
 Building a new DOS disklabel with disk identifier 0x646bfece.
 Changes will remain in memory only, until you decide to write them.
 After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
          switch off the mode (command 'c') and change display units to
          sectors (command 'u').

Command (m for help): n
 Command action
    e   extended
    p   primary partition (1-4)
 p
 Partition number (1-4): 1
 First cylinder (1-1017, default 1):
 Using default value 1
 Last cylinder, +cylinders or +size{K,M,G} (1-1017, default 1017):
 Using default value 1017

Command (m for help): w
 The partition table has been altered!

Calling ioctl() to re-read partition table.
 Syncing disks.

其它盘也进行如此操作即可

--绑定裸设备
[root@mytest1 ~]# cd /etc/udev
[root@mytest1 udev]# cd rules.d/
[root@mytest1 rules.d]# vi 60-raw.rules

# Enter raw device bindings here.
#
# An example would be:
#   ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
#   ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw3 %N"
..............
KERNEL=="raw[1-8]", OWNER="grid", GROUP="dba", MODE="660"

[root@mytest1 yum.repos.d]# start_udev
[root@mytest1 yum.repos.d]# raw -qa
/dev/raw/raw1:  bound to major 8, minor 17
/dev/raw/raw2:  bound to major 8, minor 33
/dev/raw/raw3:  bound to major 8, minor 49
/dev/raw/raw4:  bound to major 8, minor 65
/dev/raw/raw5:  bound to major 8, minor 81
/dev/raw/raw6:  bound to major 8, minor 97
/dev/raw/raw7:  bound to major 8, minor 113
/dev/raw/raw8:  bound to major 8, minor 129

--在另一个节点执行,对磁盘进行确认

[root@mytest2 ~]# partprobe

执行此命令后,可以看到在另一个节点磁盘也认到了

然后像第一个节点,编辑60-raw.rules文件

[root@mytest2 ~]# start_udev

至此,准备工作基本结束

10、安装集群软件

--上传安装文件
p13390677_112040_Linux-x86-64_3of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
p13390677_112040_Linux-x86-64_1of7.zip

3是集群安装包,1和2都是rdbms安装包
解压软件,rdbms安装包,先解压第一个,再解压第二个

--验证集群安装环境
[grid@mytest1 grid]$ ./runcluvfy.sh stage -pre crsinst -n mytest1,mytest2 -fixup -verbose

Performing pre-checks for cluster services setup

Checking node reachability...

Check: Node reachability from node "mytest1"
  Destination Node                      Reachable?             
  ------------------------------------  ------------------------
  mytest2                                yes                    
  mytest1                                yes                    
Result: Node reachability check passed from node "mytest1"


Checking user equivalence...

Check: User equivalence for user "grid"
  Node Name                             Status                 
  ------------------------------------  ------------------------
  mytest2                                passed                 
  mytest1                                passed                 
Result: User equivalence check passed for user "grid"
domain entry in file "/etc/resolv.conf" is consistent across nodes
Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...
search entry in file "/etc/resolv.conf" is consistent across nodes
Checking file "/etc/resolv.conf" to make sure that only one search entry is defined
All nodes have one search entry defined in file "/etc/resolv.conf"
Checking all nodes to make sure that search entry is "hdjt.hdad.local" as found on node "mytest2"
All nodes of the cluster have same value for 'search'
Checking DNS response time for an unreachable node
  Node Name                             Status                 
  ------------------------------------  ------------------------
  mytest2                                passed                 
  mytest1                                passed                 
The DNS response time for an unreachable node is within acceptable limit on all nodes

File "/etc/resolv.conf" is consistent across nodes

Check: Time zone consistency
Result: Time zone consistency check passed

Pre-check for cluster services setup was unsuccessful on all the nodes.

到最后,说我的没有成功,一个是dns,主要是因为可能域服务器忙,另一个是ntp服务,但这个并不影响的

--安装集群软件
打开xmanager的passive
[grid@mytest1 u02]$ export DISPLAY=172.17.255.25:0.0
[grid@mytest1 grid]$ ./runInstaller

具体步骤如下:
--选择skip software updates
--选择install and configure oracle grid infrastructure for a Cluster
--选择Typical installation
--添加第二个节点的信息
--输入密码,点击setup建立信任
--在oracle base这地方,会提示不能在同一目录,修改base为:/u01/app/oracle
--在接下来的界面中,先选择三个盘,建成normal的crsdg,其它的盘可以等以后再建。这些需要事先规划好。两个盘只能是external
--接下来的是验证系统及变量,发现了磁盘的属主不是asm,这个不影响,可以忽略
--下一步进行安装
--分别运行两个脚本,在运行root.sh时,一定要等一台完成后,再运行另一台。
--到最后,有一点小错误,是关于ntp的,这个不影响,因为我们没配

检查服务可以看到已经启动

[grid@mytest1 bin]$ ./crsctl stat resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCHDG.dg
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.CRSDG.dg
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.DATADG.dg
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.LISTENER.lsnr
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.REDODG1.dg
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.REDODG2.dg
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.asm
               ONLINE  ONLINE       mytest1                   Started            
               ONLINE  ONLINE       mytest2                   Started            
ora.gsd
               ONLINE  OFFLINE      mytest1                                      
               ONLINE  OFFLINE      mytest2                                      
ora.net1.network
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
ora.ons
               ONLINE  ONLINE       mytest1                                      
               ONLINE  ONLINE       mytest2                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       mytest2                                                   
ora.mytest1.vip
      1        ONLINE  ONLINE       mytest1                                      
ora.mytest2.vip
      1        ONLINE  ONLINE       mytest2                                      
ora.cvu
      1        ONLINE  ONLINE       mytest1                                      
ora.oc4j
      1        ONLINE  ONLINE       mytest1                                      
ora.scan1.vip
      1        ONLINE  ONLINE       mytest2

--安装rdbms软件

如果能够成功安装集群软件,安装这个应该没什么问题,直接按提示走就行了

--建立规划好的dg
[grid@mytest1 bin]$ ./asmca

图形界面操作,问题不大

--建立数据库

在这一步,遇到了麻烦,开始始终认不到dg,感觉挺奇怪,经检查其它的安装都没有问题。后来确认到是组不对!

[root@mytest1 ~]# id oracle
uid=500(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),506(asmdba)
[root@mytest1 ~]# id grid
uid=501(grid) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmoper),506(asmdba)
[root@mytest1 ~]# usermod -a -G asmadmin oracle
[root@mytest1 ~]# cd /u01/app/grid/product/11.2.0/crs/bin
[root@mytest1 bin]# chmod +s oracle

再次执行时,问题得到解决!

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29371470/viewspace-1142421/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29371470/viewspace-1142421/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值