基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.9. 配置用户等效性(可选项)

2.9.配置用户等效性(可选项)

  Oracle 11g r2 ssh也可以在安装过程中配置.

2.9.1. grid用户等效性


1.以下均以grid用户执行: 在两个节点的grid主目录分别创建.ssh目录,并赋予权限


linuxrac1

[[email protected] ~]$mkdir ~/.ssh

[[email protected] ~]$chmod 755 ~/.ssh

[[email protected] ~]$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:

7a:7b:62:31:da:07:88:0d:22:46:46:28:d1:cc:87:e1 [email protected]

[[email protected] ~]$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:

19:3b:fc:23:85:8d:f4:58:7d:f6:fd:80:99:ce:f8:52 [email protected]

linuxrac2

[[email protected] ~]$ mkdir ~/.ssh

[[email protected] ~]$ chmod 755 ~/.ssh

[[email protected] ~]$ 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:

69:8c:94:2b:2b:a4:8d:33:82:8f:b0:49:03:a1:1a:b9 [email protected]

[[email protected] ~]$ 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:

1f:4d:e7:3f:c7:4d:d8:f0:55:f0:eb:c1:ea:74:93:24 [email protected]

以上用默认配置,一路回车即可

 

linuxrac1

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[email protected] ~]$ cd .ssh

[[email protected] .ssh]$ ll

total 48

-rw-r--r-- 1 grid oinstall 2000 Sep 25 00:48 authorized_keys

-rw------- 1 grid oinstall  668 Sep 25 00:43 id_dsa

-rw-r--r-- 1 grid oinstall  604 Sep 25 00:43 id_dsa.pub

-rw------- 1 grid oinstall 1675 Sep 25 00:42 id_rsa

-rw-r--r-- 1 grid oinstall  396 Sep 25 00:42 id_rsa.pub

-rw-r--r-- 1 grid oinstall  404 Sep 25 00:48 known_hosts

linuxrac2

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys


2.建立等效性 rac1,rac2双节点执行


[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/grid/.ssh/id_rsa (/home/grid/.ssh/id_rsa)

Identity added: /home/grid/.ssh/id_dsa (/home/grid/.ssh/id_dsa)

[[email protected] ~]$ ssh linuxrac1 date

[[email protected] ~]$ ssh linuxrac1-priv date

[[email protected] ~]$ ssh linuxrac2 date

[[email protected] ~]$ ssh linuxrac2-priv date

ssh linuxrac1 date; ssh linuxrac2 date


[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/grid/.ssh/id_rsa (/home/grid/.ssh/id_rsa)

Identity added: /home/grid/.ssh/id_dsa (/home/grid/.ssh/id_dsa)

[[email protected] ~]$ ssh linuxrac1 date

[[email protected] ~]$ ssh linuxrac1-priv date

[[email protected] ~]$ ssh linuxrac2 date

[[email protected] ~]$ ssh linuxrac2-priv date

2.9.2. oracle 用户等效性


以下均以oracle用户执行


linuxrac1

[oracle @linuxrac1 ~]$mkdir ~/.ssh

[oracle @linuxrac1 ~]$chmod 755 ~/.ssh

[oracle @linuxrac1 ~]$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:

e9:2b:1a:2b:ac:5f:91:be:0f:84:17:d7:bd:b7:15:d2 [email protected]

[oracle @linuxrac1 ~]$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:

f5:0f:f5:0c:55:37:6a:08:ef:06:07:37:65:25:4a:15 [email protected]

linuxrac2

[oracle @linuxrac2 ~]$ mkdir ~/.ssh

[oracle @linuxrac2 ~]$ chmod 755 ~/.ssh

[oracle @linuxrac2 ~]$ 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:

56:47:a0:94:67:44:d9:31:12:57:44:08:9d:84:25:a1 [email protected]

[oracle @linuxrac2 ~]$ 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:

ae:f0:06:77:62:33:86:dc:f4:0d:d9:c6:38:5e:cb:61 [email protected]

以上用默认配置,一路回车即可

linuxrac1

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[[email protected] ~]$ cd .ssh

[[email protected] .ssh]$ ll

total 48

-rw-r--r-- 1 oracle oinstall 2008 Sep 25 02:20 authorized_keys

-rw------- 1 oracle oinstall  668 Sep 25 02:09 id_dsa

-rw-r--r-- 1 oracle oinstall  606 Sep 25 02:09 id_dsa.pub

-rw------- 1 oracle oinstall 1675 Sep 25 02:09 id_rsa

-rw-r--r-- 1 oracle oinstall  398 Sep 25 02:09 id_rsa.pub

-rw-r--r-- 1 oracle oinstall  404 Sep 25 02:20 known_hosts

linuxrac2

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys


建立等效性 rac1,rac2双节点执行


[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

[[email protected] ~]$ ssh linuxrac1 date

[[email protected] ~]$ ssh linuxrac1-priv date

[[email protected] ~]$ ssh linuxrac2 date

[[email protected] ~]$ ssh linuxrac2-priv date

[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

  • The authenticity of host ‘<host>‘ can‘t be established.  

  解决办法:在连接目标机上执行ssh  -o StrictHostKeyChecking=no  xxxx(机器名)

时间: 2024-09-30 19:04:55

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.9. 配置用户等效性(可选项)的相关文章

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.6.集群管理命令

3.6. 集群管理命令 3.6.1. RAC的启动与关闭 oracle rac默认会开机自启动,如需维护时可使用以下命令: 关闭: crsctl stop cluster 停止本节点集群服务 crsctl stop cluster –all 停止所有节点服务 开启: crsctl start cluster 开启本节点集群服务 crsctl stop cluster –all 开启所有节点服务 注:以上命令需以 root用户执行 3.6.2.RAC检查运行状况 以grid 用户运行 [[emai

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境

1.资源准备 最近,在VmwareStation 10虚拟机上,基于CentOS5.4安装Oracle 11g RAC,并把过程记录下来.刚开始时,是基于CentOS 6.4安装Oracle 11g RAC, 没有成功,主要是Oracle 11g RAC安装,没有针对CentOS 6.4的内核的一些包. 本文内容详实,包括安装过程中遇到的一些问题,也单独编一章节,第四章节的FAQ. http://blog.chinaunix.net/xmlrpc.php?r=blog/article&id=46

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:1.资源准备

1.1.  软件准备 SecureCRT:用于客户机通过SSH连接LINUX VmWareStation10: VMware-workstation-full-10.0.1-1379776.exe 5C4A7-6Q20J-6ZD58-K2C72-0AKPE  (已测,可用) 1Y0W5-0W205-7Z8J0-C8C5M-9A6MF NF2A7-AYK43-CZCT8-FCAN6-CA84 4A4QH-6Q195-XZW10-6K8N2-A3CJX 5A6ZT-20JD2-LZWZ9-H38N0

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.4.安装Grid Infrastructure

3.4.安装Grid Infrastructure 3.4.1.安装Grid 1.运行 grid的安装文件runInstaller [[email protected] grid]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB.   Actual 14708 MB    Passed Checking swap space: must

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.5. 配置网络

2.5.           配置网络 2.5.1.          配置网络 Oracle Rac数据库涉及到公用网络和私有网络,因此要做网络划分和IP地址规划,下表列出了要安装的RAC数据库对应的IP地址.主机名以及网络连接类型: Rac1 主机名 IP址址 子网 网络类型 解析方式 Eth0 10.10.97.161 255.255.255.0 公用网络 Eth1 192.168.2.116 255.255.255.0 私有网络 10.10.97.181 255.255.255.0 虚拟

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.5.安装oracle11gr2 database 软件与创建数据库

3.5.安装oracle11gr2 database 软件与创建数据库 3.5.1.安装Oracle 11gr2 Database 以oracle 用户登录到节点一,切换到软件安装目录,执行安装. 在oracle用户安装,首先将两个Oracle安装文件解压在一个文件夹中 [[email protected] ~]# su oracle [[email protected] root]$ cd /home/oracle [[email protected] ~]$ ll total 4 drwxr

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.3配置共享磁盘

2.3.           配置共享磁盘 2.3.1.          创建共享磁盘 在cmd中进入WMware Workstation 10.0 安装目录: 1.创建存储Oracle Clusterware文件  (Oracle Cluster Registry and voting disk) 的磁盘: vmware-vdiskmanager.exe -c -s 4Gb -a   lsilogic  -t  2  "E:\SoftwareInstall\vmware\SharedDisk

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.1创建虚拟机

2.1.           创建虚拟机 2.1.1.          创建虚拟机节点1 图略 2.1.2.          创建虚拟机节点2 操作如节点1.

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.4. 安装JDK

2.4.           安装JDK 2.4.1.          准备JDK 在百度搜索:JDK下载 2.4.2.          上传JDK put E:\软件安装文件\jdk-8u11-linux-x64.rpm /home/linuxrac1/Downloads put E:\软件安装文件\linux.x64_11gR2_database_1of2.zip /home/linuxrac1/Downloads put E:\软件安装文件\linux.x64_11gR2_databa

基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.3.安装前检查

3.3. 安装前检查 1.检查节点连通性 [[email protected] grid]$ ./runcluvfy.sh stage -post hwos -n linuxrac1,linuxrac2 -verbose Performing post-checks for hardware and operating system setup Checking node reachability... Check: Node reachability from node "linuxrac1&