Oracle 12c RAC On linux Using VMwate Workstation(安裝筆記-圖解)二

邱東陽發表於2015-01-30


九、配置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這個地址資訊,如果可以成功,則這個錯誤可以忽略。




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29532781/viewspace-1420854/,如需轉載,請註明出處,否則將追究法律責任。

相關文章