手把手教你用VMware在linux下安裝oracle10g RAC(6)-配置Clusterware安裝環境
1、設定ssh
在clusterware (CRS) 和 Rac Database安裝過程中,Oracle Universal Installer (OUI) 必須能夠以 oracle 的身份自動將軟體複製到所有 RAC 節點。這裡我們通過配置ssh 讓oracle使用者擁有不輸入密碼即可訪問各節點的能力。
首先兩個節點間互ping,要確保都是通的
[root@node1 ~]# ping 192.168.100.102
[root@node1 ~]# ping 10.10.17.222
要建立使用者等效性,需要在兩個節點上以 oracle 使用者身份生成使用者的公鑰和私鑰,首先在node1執行:
[root@node1 opt]# su - oracle
[oracle@node1 ~]$ mkdir ~/.ssh
[oracle@node1 ~]$ chmod 700 ~/.ssh
[oracle@node1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
d2:69:eb:ac:86:62:27:50:99:ff:e8:1e:a2:e6:5d:7f oracle@node1
[oracle@node1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
0a:9a:20:46:a2:28:ec:72:23:82:f2:9d:f8:62:9b:d1 oracle@node1
然後換node2執行
[root@node2 ~]# ping 192.168.100.102
[root@node2 ~]# ping 10.10.17.222
[root@node2 opt]# su - oracle
[oracle@node2 ~]$ mkdir ~/.ssh
[oracle@node2 ~]$ chmod 700 ~/.ssh
[oracle@node2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
dd:be:7a:37:e4:b5:f0:b2:24:95:50:61:ea:a1:61:07 oracle@node2
[oracle@node2 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
bc:b5:cb:43:c7:19:53:d6:f7:16:69:85:12:7f:aa:be oracle@node2
切換回node1,接著執行:
[oracle@node1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[oracle@node1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
提示:下列命令會提示你輸入node2的oracle密碼,按照提示輸入即可,如果失敗可重新嘗試執行命令。
[oracle@node1 ~]$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'node2 (192.168.100.102)' can't be established.
RSA key fingerprint is 92:d1:ce:5b:c8:a1:52:d5:ac:00:5f:48:5d:12:06:e4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2,192.168.100.102' (RSA) to the list of known hosts.
oracle@node2's password:
[oracle@node1 ~]$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@node2's password:
[oracle@node1 ~]$ scp ~/.ssh/authorized_keys node2:~/.ssh/authorized_keys
oracle@node2's password:
authorized_keys 100% 1992 2.0KB/s 00:00
兩機相互執行,看看是否還需要輸入密碼
[oracle@node1 ~]$ ssh node1 date
[oracle@node1 ~]$ ssh node2 date
[oracle@node1 ~]$ ssh node1-priv date
[oracle@node1 ~]$ ssh node2-priv date
切換至node2執行
[oracle@node2 ~]$ ssh node1 date
[oracle@node2 ~]$ ssh node2 date
[oracle@node2 ~]$ ssh node1-priv date
[oracle@node2 ~]$ ssh node2-priv date
提示:
注意命令的返回資訊,由於rac對節點間時間較敏感,因此如果此處顯示節點單時間不一至,建議同步(一般相隔超過20秒就需要同步時間了)。
2、配置asm
注意:必須以root身份進行
首先在node1執行:
[root@node1 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
提示:如果本步執行出錯(可能出錯機率最高的是在Scanning system for ASM),不妨將轉換一下命令列的執行方式,改成:
[root@node1 ~]# sh /etc/init.d/oracleasm configure
有可能解決你的問題!
然後切換至node2執行
[root@node2 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
再切換回node1執行
[root@node1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
[root@node1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sde1
Marking disk "/dev/sde1" as an ASM disk: [ OK ]
[root@node1 linux-patch]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
檢視一下當前的磁碟組:
Scanning system for ASM disks: [ OK ]
[root@node1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
Node2上也檢視一下當前磁碟組:
[root@node2 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@node2 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
Ok,配置完成,準備進入到crs的安裝階段
=============================================
檢視前面的連載:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7607759/viewspace-351954/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 手把手教你用VMware在linux下安裝oracle10g RAC(4)-配置linux環境LinuxOracle
- 手把手教你用VMware在linux下安裝oracle10g RAC(4)-配置linux環境續LinuxOracle
- 在VMware 上安裝配置Oracle10g RACOracle
- 手把手教你用VMware安裝oracle10g RAC(10)-外傳之共享儲存的配置Oracle
- Linux環境下nginx安裝配置LinuxNginx
- jdk在linux下安裝、配置環境變數JDKLinux變數
- 在linux環境下安裝JDK並配置環境變數LinuxJDK變數
- 在linux環境下安裝MysqlLinuxMySql
- 在Linux環境下安裝JBOSSLinux
- Oracle 12cR1 RAC 在VMware Workstation上安裝(上)—OS環境配置Oracle
- 在RAC環境下安裝實施GoldenGateGo
- 在AIX上安裝配置Oracle10g RACAIOracle
- Linux環境HBase安裝配置Linux
- Linux環境Azkaban安裝配置Linux
- Docker 下安裝配置 lnmp 環境DockerLNMP
- Mac環境下安裝配置RedisMacRedis
- windows下配置安裝YAF環境Windows
- 在RAC下安裝配置OGG
- yapi 在linux環境下的安裝部署APILinux
- 在Linux環境下安裝JDK+JBossLinuxJDK
- vmware環境oracle 10.2.0 rac 在linux as4 64bit上的安裝OracleLinux
- Linux下安裝Go環境LinuxGo
- Windows環境下安裝LinuxWindowsLinux
- linux環境下redis安裝LinuxRedis
- Linux環境下安裝NginxLinuxNginx
- LINUX環境下安裝TIPTOPLinux
- Linux下Java環境安裝LinuxJava
- 按照online文件在Linux下安裝Oracle 10g RAC(三.安裝clusterware和database)LinuxOracle 10gDatabase
- 使用VMware Workstation安裝 Linux虛擬環境Linux
- Linux環境下elasticsearch-6.2.2安裝以及配置LinuxElasticsearch
- Linux & Windows 環境下 RabbitMQ 安裝與基本配置LinuxWindowsMQ
- Linux & Windows 環境下 Redis 安裝與基本配置LinuxWindowsRedis
- 【解除安裝】在LINUX/UNIX環境下解除安裝Oracle的OLAP元件LinuxOracle元件
- RAC CLUSTERWARE 10G+vmware server 2+LINUX 5.3+裸裝置 安裝指南ServerLinux
- vmware中安裝centos6.5配置網路環境CentOS
- 在linux環境下安裝python3.6LinuxPython
- 在Linux環境下安裝Progres資料庫Linux資料庫
- CodeMan快速安裝配置教程:Windows下安裝配置Java JDK環境WindowsJavaJDK