手把手教你用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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux環境下nginx安裝配置LinuxNginx
- jdk在linux下安裝、配置環境變數JDKLinux變數
- vmware + 裸裝置 + crs + oracle10g RAC搭建步驟(二):安裝linuxOracleLinux
- Linux環境HBase安裝配置Linux
- Linux環境Azkaban安裝配置Linux
- yapi 在linux環境下的安裝部署APILinux
- Linux下安裝Go環境LinuxGo
- linux環境下redis安裝LinuxRedis
- Windows環境下安裝LinuxWindowsLinux
- Linux下Java環境安裝LinuxJava
- Linux環境下安裝NginxLinuxNginx
- 使用VMware Workstation安裝 Linux虛擬環境Linux
- Linux環境下的Android的ADK安裝配置LinuxAndroid
- Linux & Windows 環境下 RabbitMQ 安裝與基本配置LinuxWindowsMQ
- Linux & Windows 環境下 Redis 安裝與基本配置LinuxWindowsRedis
- Linux環境下elasticsearch-6.2.2安裝以及配置LinuxElasticsearch
- Docker 下安裝配置 lnmp 環境DockerLNMP
- Mac環境下安裝配置RedisMacRedis
- Linux環境下ApacheActiveMQ基本安裝LinuxApacheMQ
- 快速搭建 Linux(LNMP + Linux 安裝 + 環境配置)LinuxLNMP
- Linux下安裝Python,以及環境變數的配置LinuxPython變數
- 在Ubuntu環境下安裝eclipseUbuntuEclipse
- Linux環境Flume安裝配置及使用Linux
- Linux環境Sqoop安裝配置及使用LinuxOOP
- Linux環境Hive安裝配置及使用LinuxHive
- Linux環境Spark安裝配置及使用LinuxSpark
- Linux下檢視jdk安裝路徑版本、安裝jdk、配置環境變數LinuxJDK變數
- 在linux環境安裝單機RocketMQLinuxMQ
- linux環境安裝——mysql安裝複習LinuxMySql
- linux環境安裝——kafka安裝複習LinuxKafka
- 5分鐘教你在Linux下安裝VMwareLinux
- linux或者CentOS環境下安裝.NET Core環境LinuxCentOS
- linux環境下安裝nginx步驟LinuxNginx
- Linux 環境下編譯安裝 RedisLinux編譯Redis
- Linux環境下Apache ActiveMQ 基本安裝LinuxApacheMQ
- Linux 下使用 Docker 安裝lnmp環境LinuxDockerLNMP
- 在 Linux 上安裝 VMware 工具Linux
- Linux安裝jdk環境LinuxJDK
- Linux環境安裝GOLinuxGo