Chinaunix首页 | 论坛 | 博客
  • 博客访问: 229541
  • 博文数量: 57
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 674
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-30 22:48
个人简介

2014,换个角度,希望接下来的事情值得期待。

文章分类

全部博文(57)

文章存档

2015年(1)

2014年(55)

2013年(1)

我的朋友

分类: Oracle

2014-01-11 23:32:21

二十八、配置两个节点SSH的口令,互为可信的
    [root@rac2 ~]# su - grid
-bash: [: missing `]'
-bash: grid: command not found
[grid@rac2 ~]$ mkdir ~/ .ssh
mkdir: cannot create directory `/home/grid/': File exists
[grid@rac2 ~]$ chmod 700 .ssh
[grid@rac2 ~]$ ls -la
total 32
drwx------. 3 grid oinstall 4096 Jul  9 09:53 .
drwxr-xr-x. 4 root root     4096 Jul  9  2013 ..
-rw-------. 1 grid oinstall   33 Jul  9  2013 .bash_history
-rw-r--r--. 1 grid oinstall   18 Mar 29  2011 .bash_logout
-rw-r--r--. 1 grid oinstall  390 Jul  9  2013 .bash_profile
-rw-r--r--. 1 grid oinstall  124 Mar 29  2011 .bashrc
drwx------  2 grid oinstall 4096 Jul  9 09:53 .ssh
-rw-------. 1 grid oinstall  645 Jul  9  2013 .viminfo
[grid@rac2 ~]$ cd .ssh
[grid@rac2 .ssh]$ touch authorized_keys
[grid@rac2 .ssh]$ /usr/bin/ssh-keygen -t dsa
回车
回车
回车
 
 
对节点rac1同样:
[root@rac1 ~]# hostname
rac1
[root@rac1 ~]# su - grid
-bash: [: missing `]'
-bash: grid: command not found
[grid@rac1 ~]$ ls -la
total 32
drwx------. 3 grid oinstall 4096 Jul  9 17:51 .
drwxr-xr-x. 4 root root     4096 Jul  9 16:14 ..
-rw-------. 1 grid oinstall   86 Jul  9 17:52 .bash_history
-rw-r--r--. 1 grid oinstall   18 Mar 29  2011 .bash_logout
-rw-r--r--. 1 grid oinstall  390 Jul  9 16:16 .bash_profile
-rw-r--r--. 1 grid oinstall  124 Mar 29  2011 .bashrc
drwxr-xr-x  2 grid oinstall 4096 Jul  9 17:51 .ssh
-rw-------. 1 grid oinstall  645 Jul  9 16:16 .viminfo
[grid@rac1 ~]$ mkdir ~/ .ssh
mkdir: cannot create directory `/home/grid/': File exists
mkdir: cannot create directory `.ssh': File exists
[grid@rac1 ~]$ chmod 700 .ssh
[grid@rac1 ~]$ ls -la
total 32
drwx------. 3 grid oinstall 4096 Jul  9 17:51 .
drwxr-xr-x. 4 root root     4096 Jul  9 16:14 ..
-rw-------. 1 grid oinstall   86 Jul  9 17:52 .bash_history
-rw-r--r--. 1 grid oinstall   18 Mar 29  2011 .bash_logout
-rw-r--r--. 1 grid oinstall  390 Jul  9 16:16 .bash_profile
-rw-r--r--. 1 grid oinstall  124 Mar 29  2011 .bashrc
drwx------  2 grid oinstall 4096 Jul  9 17:51 .ssh
-rw-------. 1 grid oinstall  645 Jul  9 16:16 .viminfo
[grid@rac1 ~]$ cd .ssh
[grid@rac1 .ssh]$ ls
[grid@rac1 .ssh]$ touch authorized_keys
[grid@rac1 .ssh]$ /usr/bin/ssh-keygen -t dsa
[grid@rac1 .ssh]$ ll
[grid@rac1 .ssh]$ cat id_dsa.pub >> authorized_keys 
[grid@rac1 .ssh]$ ssh rac2 cat .ssh/id_dsa.pub >> authorized_keys 
The authenticity of host 'rac2 (192.168.1.204)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.1.204' (RSA) to the list of known hosts.
grid@rac2's password: 
[grid@rac1 .ssh]$ scp authorized_keys rac2:~/ .ssh
.ssh: No such file or directory
[grid@rac1 .ssh]$ scp authorized_keys rac2:.ssh
grid@rac2's password: 
authorized_keys                                                                        100% 1198     1.2KB/s   00:00    
[grid@rac1 .ssh]$ 
[grid@rac1 .ssh]$ ssh rac2 date
Tue Jul  9 10:11:53 EDT 2013
[grid@rac1 .ssh]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.1.203)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.203' (RSA) to the list of known hosts.
Tue Jul  9 18:11:56 EDT 2013
 
登录第二个节点rac2:
[grid@rac2 .ssh]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.1.203)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.203' (RSA) to the list of known hosts.
Tue Jul  9 18:11:24 EDT 2013
[grid@rac2 .ssh]$ ssh rac2 date
The authenticity of host 'rac2 (192.168.1.204)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.1.204' (RSA) to the list of known hosts.
Tue Jul  9 10:12:17 EDT 2013
[grid@rac2 .ssh]$ 
 
修改到ORACLE用户,在第二个节点rac2:
[grid@rac2 .ssh]$ su - oracle
Password: 
-bash: [: missing `]'
-bash: oracle: command not found
[oracle@rac2 ~]$ mkdir .ssh
[oracle@rac2 ~]$ chmod 700 .ssh
[oracle@rac2 ~]$ touch .ssh/authorized_keys
[oracle@rac2 ~]$ cd .ssh
[oracle@rac2 .ssh]$ /usr/bin/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:
d3:c1:6a:87:6c:07:0e:bf:38:f8:ca:5a:47:b5:f1:d9 oracle@rac2
The key's randomart image is:
+--[ DSA 1024]----+
|                 |
|         .       |
|      . + o      |
|       * O +     |
|      . S * E    |
|     o + =       |
|    o + .        |
|   o o .         |
|  ..o..          |
+-----------------+
[oracle@rac2 .ssh]$ 
 
在第一个节点rac1:
[grid@rac1 .ssh]$ su - oracle
Password: 
-bash: [: missing `]'
-bash: oracle: command not found
[oracle@rac1 ~]$ mkdir .ssh
[oracle@rac1 ~]$ chmod 700 .ssh
[oracle@rac1 ~]$ touch .ssh/authorized_keys
[oracle@rac1 ~]$ cd .ssh
[oracle@rac1 .ssh]$ /usr/bin/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:
80:fb:92:23:47:6e:f7:2f:c2:6c:56:6d:f1:ad:c1:3e oracle@rac1
The key's randomart image is:
+--[ DSA 1024]----+
|                 |
|     .           |
|    . .          |
|     . .  .      |
|    o   S. + .   |
|   o o  . o + .  |
|  . Boo. . . o   |
|   + +*..   E    |
|     o ..o.  .   |
+-----------------+
[oracle@rac1 .ssh]$ ll
total 8
-rw-r--r-- 1 oracle oinstall   0 Jul  9 18:16 authorized_keys
-rw------- 1 oracle oinstall 668 Jul  9 18:16 id_dsa
-rw-r--r-- 1 oracle oinstall 601 Jul  9 18:16 id_dsa.pub
[oracle@rac1 .ssh]$ cat id_dsa.pub >>authorized_keys 
[oracle@rac1 .ssh]$ ssh rac2 cat .ssh/id_dsa.pub >> authorized_keys 
The authenticity of host 'rac2 (192.168.1.204)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.1.204' (RSA) to the list of known hosts.
oracle@rac2's password: 
[oracle@rac1 .ssh]$ ll
total 16
-rw-r--r-- 1 oracle oinstall 1202 Jul  9 18:18 authorized_keys
-rw------- 1 oracle oinstall  668 Jul  9 18:16 id_dsa
-rw-r--r-- 1 oracle oinstall  601 Jul  9 18:16 id_dsa.pub
-rw-r--r-- 1 oracle oinstall  400 Jul  9 18:18 known_hosts
 
[oracle@rac1 .ssh]$ scp authorized_keys rac2:.ssh/
oracle@rac2's password: 
authorized_keys                                                                        100% 1202     1.2KB/s   00:00    
[oracle@rac1 .ssh]$ ssh rac2 date
Tue Jul  9 10:20:07 EDT 2013
[oracle@rac1 .ssh]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.1.203)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.203' (RSA) to the list of known hosts.
Tue Jul  9 18:19:57 EDT 2013
登录第二个节点rac2:
[oracle@rac2 .ssh]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.1.203)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.203' (RSA) to the list of known hosts.
Tue Jul  9 18:20:39 EDT 2013
[oracle@rac2 .ssh]$ ssh rac2 date
The authenticity of host 'rac2 (192.168.1.204)' can't be established.
RSA key fingerprint is de:71:21:35:46:f1:a4:94:18:ad:d2:54:86:0b:1f:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2

二十九、
下载软件:
linux_11gR2_database_1of2.zip
linux_11gR2_database_2of2.zip
linux_11gR2_grid.zip
传到第一个节点rac1 ,/opt/download/setup/文件夹下面
 
[oracle@rac1 .ssh]$ su - root
[root@rac1 ~]# cd /opt/download/setup
[root@rac1 setup]# unzip linux_11gR2_grid.zip
[root@rac1 setup]# cd /u01
[root@rac1 u01]# ls
grid  gridbase  oracle
[root@rac1 u01]# mv /opt/download/setup/grid/ g
[root@rac1 u01]# ls
g  grid  gridbase  oracle
[root@rac1 u01]# ls
g  grid  gridbase  oracle
[root@rac1 u01]# chown -R grid:oinstall g
[root@rac1 u01]# cd g
[root@rac1 g]# ll
[root@rac1 g]# su - grid
-bash: [: missing `]'
-bash: grid: command not found
[grid@rac1 ~]$ cd /u01
[grid@rac1 u01]$ cd /g
-bash: cd: /g: No such file or directory
[grid@rac1 u01]$ cd g
[grid@rac1 g]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup -verbose
 
检查结果是否成功,解决所有的问题后,才能向下进行

三十、安装
 
如果./runInstaller 有问题的话(在export多试验几次)
[grid@rac1 g]$ su - root
[root@rac1 ~]# export DISPLAY=192.168.1.101:1.0
[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host
[root@rac1 ~]# su - grid
-bash: [: missing `]'
-bash: grid: command not found
[grid@rac1 ~]$ cd /u01/g
[grid@rac1 g]$ ll

[grid@rac1 g]$ ./runInstaller 
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB.   Actual 17537 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4063 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-11_09-18-54AM. Please wait ...[grid@rac1 g]$
阅读(1329) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~