Oracle 12c RAC On linux Using VMwate Workstation(安装笔记-图解)二

Oracle 12c RAC On linux Using VMwate Workstation(安装笔记-图解)二

 

九、配置ssh与时间同步

for oracle user

主要在安装的过程当中,会用scp命令将安装节点上的文件拷贝到别的节点上.

# su - oracle

$ mkdir .ssh

$ chmod 700 .ssh

$ cd .ssh/

$ ssh-keygen -t rsa  (生成秘钥对)

 

(两台主机都需要操作)

 

4.生成秘钥对的认证文件:

在rac1上操作(以下都在rac1下操作):

$ ssh 12crac1 cat /home/oracle/.ssh/id_rsa.pub >>authorized_keys

$ ssh 12crac2 cat /home/oracle/.ssh/id_rsa.pub >>authorized_keys

[oracle@12crac1 .ssh]$ ssh 12crac1 cat /home/oracle/.ssh/id_rsa.pub >>authorized_keys

The authenticity of host ‘12crac1 (192.168.133.12)‘ can‘t be established.

RSA key fingerprint is f5:aa:00:d7:41:d0:5b:d9:1b:78:65:f3:af:36:a0:dc.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘12crac1,192.168.133.12‘ (RSA) to the list of known hosts.

oracle@12crac1‘s password:

(注意:在创建认证文件的时候,需要输入对方主机oracle用户的密码)


$scp authorized_keys 12crac2:/home/oracle/.ssh/   (将主机rac1上生成的认证文件拷贝到rac2上)

 

[oracle@12crac1 .ssh]$ scp authorized_keys 12crac2:/home/oracle/.ssh/

oracle@12crac2‘s password:

authorized_keys                                                                                                                      100%  792     0.8KB/s   00:00authorized_keys                                    100%  786     0.8KB/s   00:00

 

$chmod 600 authorized_keys

(该命令两台主机都需要操作)

 

5.验证认证文件:

$ssh 12crac1 date

$ssh 12crac2 date

$ssh 12crac1-priv date

$ssh 12crac2-priv date

(两台主机都需要操作, 如果登录另一台主机,而不需要输入密码,则说明配置成功)

 

for grid user

1.创建隐藏文件夹.ssh

# su - grid

$ mkdir .ssh

$ chmod 700 .ssh

$ cd .ssh/

$ ssh-keygen -t rsa  (生成秘钥对)

(两台主机都需要操作)

2.生成秘钥对的认证文件:

在rac1上操作:

$ ssh 12crac1 cat /home/grid/.ssh/id_rsa.pub >>authorized_keys

$ ssh 12crac2 cat /home/grid/.ssh/id_rsa.pub >>authorized_keys

 (注意:在创建认证文件的时候,需要输入对方主机grid用户的密码)

$scp authorized_keys 12crac2:/home/grid/.ssh/ 

 (将主机rac1上生成的认证文件拷贝到rac2上)

 

$chmod 600 authorized_keys

 (该命令两台主机都需要操作)

 3.验证认证文件:

$ssh 12crac1 date

$ssh 12crac2 date

$ssh 12crac1-priv date

$ssh 12crac2-priv date

 (两台主机都需要操作, 如果登录另一台主机,而不需要输入密码,则说明配置成功)

配置时间同步

 

节点1配置成时间同步服务器:
[root@12crac1 ~]#  vi /etc/ntp.conf 
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 11 
broadcastdelay 0.008
driftfile /var/lib/ntp/drift
启动NTP服务:
[root@12crac1 ~]#  /etc/init.d/ntpd start
Starting ntpd:                                             [  OK  ]
设置NTP 随系统启动:
[root@12crac1 ~]#  chkconfig --level 345 ntpd on
[root@12crac1 ~]# chkconfig --list |grep ntp
ntpd            0:off 1:off 2:off 3:on 4:on 5:on 6:off

节点2配置:
[root@12crac2 ~]#  chkconfig --list |grep ntpd
ntpd            0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@12crac2 ~]#  chkconfig --level 345 ntpd off   
[root@12crac2 ~]#  chkconfig --list |grep ntpd
ntpd            0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@12crac2 ~]#  service ntpd stop
Shutting down ntpd: 
[root@12crac2 ~]# vi /etc/crontab
*/5 * * * * root /usr/sbin/ntpdate 192.168.133.12  //5分钟同步1次

 

 

 

 

 

十、上传安装包并解压



 

[grid@12crac1 grid]$pwd

/grid/app/grid

[grid@12crac1 grid]$ chmod +x *.zip

[grid@12crac1 grid]$ unizp linuxamd64_12102_grid_1of2.zip

[grid@12crac1 grid]$ unizp linuxamd64_12102_grid_2of2.zip

 

 

[oracle@12crac1 oracle]$ pwd

/oracle/app/oracle

[oracle@12crac1 oracle]$ chmod +x *.zip

[oracle@12crac1 oracle]$ unzip linuxamd64_12102_database_1of2.zip

[oracle@12crac1 oracle]$ unzip linuxamd64_12102_database_2of2.zip

十一、安装gird

开启图形界面工具---我的是Xmanager – Passive

[grid@12crac1 grid]$ ls

install  response  rpm  runcluvfy.sh  runInstaller  sshsetup  stage  welcome.html

[grid@12crac1 grid]$ ./runInstaller





















可以同过fix & check Again 来解决一般问题


执行root脚本:

 

节点1:

[root@12crac1 /]# /grid/oraInventory/orainstRoot.sh

Changing permissions of /grid/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /grid/oraInventory to oinstall.

The execution of the script is complete.

[root@12crac1 /]# /grid/app/grid/12.1.0/root.sh

Performing root user operation.

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /grid/app/grid/12.1.0

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   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/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: /grid/app/grid/12.1.0/crs/install/crsconfig_params

2015/01/20 23:06:22 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.

 

2015/01/20 23:06:56 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.

 

2015/01/20 23:06:59 CLSRSC-363: User ignored prerequisites during installation

 

OLR initialization - successful

  root wallet

  root wallet cert

  root cert export

  peer wallet

  profile reader wallet

  pa wallet

  peer wallet keys

  pa wallet keys

  peer cert request

  pa cert request

  peer cert

  pa cert

  peer root cert TP

  profile reader root cert TP

  pa root cert TP

  peer pa cert TP

  pa peer cert TP

  profile reader pa cert TP

  profile reader peer cert TP

  peer user cert

  pa user cert

2015/01/20 23:07:57 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.conf‘

 

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Oracle High Availability Services has been started.

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Oracle High Availability Services has been started.

CRS-2672: Attempting to start ‘ora.evmd‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.mdnsd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.mdnsd‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.evmd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.gpnpd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.gipcd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.cssdmonitor‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.gipcd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.cssd‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.diskmon‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.diskmon‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.cssd‘ on ‘12crac1‘ succeeded

 

ASM created and started successfully.

 

Disk Group DATA created successfully.

 

CRS-2672: Attempting to start ‘ora.crf‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.storage‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.storage‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.crf‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.crsd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.crsd‘ on ‘12crac1‘ succeeded

CRS-4256: Updating the profile

Successful addition of voting disk 1bcb27c003784f2bbf11c8d321d97dbd.

Successfully replaced voting disk group with +DATA.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   1bcb27c003784f2bbf11c8d321d97dbd (/dev/asm-disk1) [DATA]

Located 1 voting disk(s).

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘12crac1‘

CRS-2673: Attempting to stop ‘ora.crsd‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.crsd‘ on ‘12crac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.ctssd‘ on ‘12crac1‘

CRS-2673: Attempting to stop ‘ora.evmd‘ on ‘12crac1‘

CRS-2673: Attempting to stop ‘ora.storage‘ on ‘12crac1‘

CRS-2673: Attempting to stop ‘ora.mdnsd‘ on ‘12crac1‘

CRS-2673: Attempting to stop ‘ora.drivers.acfs‘ on ‘12crac1‘

CRS-2673: Attempting to stop ‘ora.gpnpd‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.storage‘ on ‘12crac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.asm‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.drivers.acfs‘ on ‘12crac1‘ succeeded

CRS-2677: Stop of ‘ora.ctssd‘ on ‘12crac1‘ succeeded

CRS-2677: Stop of ‘ora.gpnpd‘ on ‘12crac1‘ succeeded

CRS-2677: Stop of ‘ora.mdnsd‘ on ‘12crac1‘ succeeded

CRS-2677: Stop of ‘ora.evmd‘ on ‘12crac1‘ succeeded

CRS-2677: Stop of ‘ora.asm‘ on ‘12crac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.cluster_interconnect.haip‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.cluster_interconnect.haip‘ on ‘12crac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.cssd‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.cssd‘ on ‘12crac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.crf‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.crf‘ on ‘12crac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.gipcd‘ on ‘12crac1‘

CRS-2677: Stop of ‘ora.gipcd‘ on ‘12crac1‘ succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘12crac1‘ has completed

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Starting Oracle High Availability Services-managed resources

CRS-2672: Attempting to start ‘ora.mdnsd‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.evmd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.mdnsd‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.evmd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.gpnpd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.gipcd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.gipcd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.cssdmonitor‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.cssd‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.diskmon‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.diskmon‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.cssd‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.cluster_interconnect.haip‘ on ‘12crac1‘

CRS-2672: Attempting to start ‘ora.ctssd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.ctssd‘ on ‘12crac1‘ succeeded

CRS-2676: Start of ‘ora.cluster_interconnect.haip‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.asm‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.asm‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.storage‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.storage‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.crf‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.crf‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.crsd‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.crsd‘ on ‘12crac1‘ succeeded

CRS-6023: Starting Oracle Cluster Ready Services-managed resources

CRS-6017: Processing resource auto-start for servers: 12crac1

CRS-6016: Resource auto-start has completed for server 12crac1

CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources

CRS-4123: Oracle High Availability Services has been started.

2015/01/20 23:15:05 CLSRSC-343: Successfully started Oracle Clusterware stack

 

CRS-2672: Attempting to start ‘ora.asm‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.asm‘ on ‘12crac1‘ succeeded

CRS-2672: Attempting to start ‘ora.DATA.dg‘ on ‘12crac1‘

CRS-2676: Start of ‘ora.DATA.dg‘ on ‘12crac1‘ succeeded

2015/01/20 23:18:04 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

节点2:

[root@12crac2 /]# /grid/oraInventory/orainstRoot.sh

Changing permissions of /grid/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /grid/oraInventory to oinstall.

The execution of the script is complete.

 

[root@12crac2 ~]# /grid/app/grid/12.1.0/root.sh

Performing root user operation.

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /grid/app/grid/12.1.0

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

 

 

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: /grid/app/grid/12.1.0/crs/install/crsconfig_params

2015/01/21 18:33:14 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.

 

2015/01/21 18:34:00 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.

 

2015/01/21 18:34:03 CLSRSC-363: User ignored prerequisites during installation

 

OLR initialization - successful

2015/01/21 18:35:38 CLSRSC-330: Adding Clusterware entries to file ‘oracle-ohasd.conf‘

 

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Oracle High Availability Services has been started.

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Oracle High Availability Services has been started.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘12crac2‘

CRS-2673: Attempting to stop ‘ora.drivers.acfs‘ on ‘12crac2‘

CRS-2677: Stop of ‘ora.drivers.acfs‘ on ‘12crac2‘ succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘12crac2‘ has completed

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Starting Oracle High Availability Services-managed resources

CRS-2672: Attempting to start ‘ora.mdnsd‘ on ‘12crac2‘

CRS-2672: Attempting to start ‘ora.evmd‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.mdnsd‘ on ‘12crac2‘ succeeded

CRS-2676: Start of ‘ora.evmd‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.gpnpd‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.gipcd‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.gipcd‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.cssdmonitor‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.cssd‘ on ‘12crac2‘

CRS-2672: Attempting to start ‘ora.diskmon‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.diskmon‘ on ‘12crac2‘ succeeded

CRS-2676: Start of ‘ora.cssd‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.cluster_interconnect.haip‘ on ‘12crac2‘

CRS-2672: Attempting to start ‘ora.ctssd‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.ctssd‘ on ‘12crac2‘ succeeded

CRS-2676: Start of ‘ora.cluster_interconnect.haip‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.asm‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.asm‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.storage‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.storage‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.crf‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.crf‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.crsd‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.crsd‘ on ‘12crac2‘ succeeded

CRS-6017: Processing resource auto-start for servers: 12crac2

CRS-2672: Attempting to start ‘ora.net1.network‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.net1.network‘ on ‘12crac2‘ succeeded

CRS-2672: Attempting to start ‘ora.ons‘ on ‘12crac2‘

CRS-2676: Start of ‘ora.ons‘ on ‘12crac2‘ succeeded

CRS-6016: Resource auto-start has completed for server 12crac2

CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources

CRS-4123: Oracle High Availability Services has been started.

2015/01/21 18:40:33 CLSRSC-343: Successfully started Oracle Clusterware stack

 

2015/01/21 18:40:58 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

 

导致这个错误的原因是NTP设置问题,可以忽略。 


还有一种报错是关于SCAN 的, 可能是在/etc/hosts中配置了SCAN的地址,尝试ping这个地址信息,如果可以成功,则这个错误可以忽略。

 

Oracle 12c RAC On linux Using VMwate Workstation(安装笔记-图解)二

上一篇:oracle 11g 从+DATA迁移到+newdata ASM 磁盘组迁移


下一篇:redis缓存与数据库一致性