VMWARE+linux+oracle 10g RAC 之一
參考文件:
linux-10g-rac.doc
oracle-on-linux vmware 簡明手冊.doc
在 Linux 和 FireWire 上構建您自己的 Oracle RAC 10g 第 2 版叢集.mht
[@more@]第一部分 安裝linux
一 安裝VMWARE
下載vmware server,並進行安裝,這個資料比較多,此處略去.
二 安裝一個節點上的作業系統
節點名稱: linux1
作業系統: linux as3 update5
新增兩塊網路卡: 介面型別Bridged
IP地址規劃如下所示:
rac1的IP地址:
---------eht0-----------------
linux1 10.0.10.82
linux1-vip 10.0.10.92
----------eth1----------------
linux1-san 10.10.10.2
rac2的IP地址:
---------eht0-----------------
linux1 10.0.10.83
linux1-vip 10.0.10.93
----------eth1----------------
linux1-san 10.10.10.2
IP的設定方法參考資料:
ifconfig eth0:0 192.168.230.2 netmask 255.255.255.0 up
ifconfig eth0:1 192.168.230.20 netmask 255.255.255.0 up
將ip配置儲存到檔案中:
/etc/sysconfig/network-scripts/ifcfg-eth0
這樣重起後就不會丟了
對linux的網路配置檔案:/etc/sysconfig/network-scripts/..
對SCO-Unix的網路配置檔案:/etc/tcp檔案
注意:對於RAC的配置,只需要使用圖形介面,進行配置即可.VIP IP在安裝CRS軟體時自動配置.
三 複製節點1,生成節點2 ,並做一些修改
四 檢查核心版本
[root@linux1 root]# uname -rm
2.4.21-32.EL i686
第二部分 配置linux for ORACLE
一 增加ORACLE使用者和組
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
passwd oracle
二 增加掛載點
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
三 配置核心引數
cat >> /etc/sysctl.conf << EOF
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 658576
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 1048536
net.core.wmem_max = 1048536
EOF
/sbin/sysctl -p
四 配置oracle使用者的SHELL限制
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login << EOF
session required /lib/security/pam_limits.so
EOF
五 配置心跳模組
modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
cat >> /etc/rc.d/rc.local << EOF
modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
EOF
在此處注意 /etc/rc.local實際上是rc.d/rc.local的連結
六 配置/etc/hosts
[root@linux1 root]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.0.10.82 linux1
10.0.10.83 linux2
10.10.10.2 linux1-priv
10.10.10.3 linux2-priv
10.0.10.92 linux1-vip
10.0.10.93 linux2-vip
七 配置SSH,使使用者相互信任
From each node, logged in as oracle:
mkdir ~/.ssh
chmod 755 ~/.ssh
/usr/bin/ssh-keygen -t rsa
Cut and paste the following line separately:
/usr/bin/ssh-keygen -t dsa
--------------------------------------------------------------------------------
From the first node ONLY, logged in as oracle (copy the local account's keys so that ssh to the local node will work):
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
Now copy the keys to the other node so that we can ssh to the remote node without being prompted for a password.
ssh oracle@ds2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh oracle@ds2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 644 ~/.ssh/authorized_keys
--------------------------------------------------------------------------------
Now do the same for the second node.
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh oracle@ds1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh oracle@ds1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 644 ~/.ssh/authorized_keys
八 建立使用者等價(使用者信任)
ssh配置完成後,建立使用者信任.仍然是在ORACLE使用者下.
As oracle on the node where the Oracle 10g Release 2 software will be installed (ds1):
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
(Note that user equivalence is established for the current session only. If you switch to a different session or log out and back in, you will have to run ssh-agent and ssh-add again to re-establish user equivalence.)
九 測試連線
[oracle@linux1 oracle]$ ssh linux2 date
只有這些還不夠,還要安裝rsh服務,由於這個原因,導致在INSTALL CRS軟體時,一直過不去.
----------CRS安裝失敗,查網上資料,屬於ssh 與 rsh設定後,沒有相互驗證.,除了SSH之外,把RSH也給配置上
----------另外,為了方便起見,在/etc/hosts檔案中不要別名,這樣就解決了節點不能clusterable的問題,除了配置root使用者的相互信任外,還新增了oracle使用者之間的相互信任
----------------------------------參考資料 設定rlogin、rsh----------------------------------------------
由於在第一個節點上安裝oracle軟體時,oracle會自動將第一個節點上安裝完畢的檔案複製到第二個節點上,因此需要配置rlogin和rsh以及rcp等。
(1)確定是否安裝了rsh-server軟體。
[root@linux1 root]# rpm ?qa | grep rsh
(2)如果沒有安裝,則從AS3安裝介質上找到該rpm包,並進行安裝。
(3)安裝好以後,需要啟動rsh、rlogin、rexec服務。輸入以下命令,並從彈出的框中選中rsh、rlogin、rexec後確認。
[root@linux1 root]# ntsysv
(4)啟用rsh、rlongin服務
[root@linux1 root]# service xinetd restart
(5)修改/etc/securetty
[root@linux1 root]# echo "rexec" >> /etc/securetty;echo "rlogin" >> /etc/securetty;echo "rsh" >> /etc/securetty
(6)設定允許root進行rsh、rlogin
[root @linux1 /root]# vi /etc/pam.d/rlogin
將authrequiredpam_securetty.so這一行開頭新增#,從而註釋該行。
(7)在/etc目錄下建立hosts.equiv檔案,表示兩臺linux節點互相信任。
[root @linux1 /root]# vi /etc/hosts.equiv
在該檔案裡新增如下內容:
linux1
linux2
linux1-prv
linux2-prv
(8)在root的$HOME目錄下,建立.rhosts檔案。
[root @linux1 /root]# vi .rhosts
在該檔案裡新增如下內容。這樣,root使用者就可以直接rlogin、rsh而不用輸入密碼。
linux1 root
linux2 root
linux1-prv root
linux2-prv root
(9)配置完以後,我們可以測試一下是否成功。
[root @linux1 /root]# rlogin linux2 [root @linux1 /root]# rsh ?l root linux2 cat /etc/hosts [root @linux1 /root]# rcp /tmp/testlinux2:/tmp
另外,在文件<<在Linux和FireWire上構建您自己的Oracle RAC 10g第2版叢集(3).mht>>中,有rsh專門的介紹.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271063/viewspace-998650/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 10g RAC on AIXAI
- Oracle 10g RAC故障處理Oracle 10g
- Solaris 10下遷移10G RAC (六)
- Solaris 10下遷移10G RAC (八)
- Solaris 10下遷移10G RAC (四)
- Solaris 10下遷移10G RAC (二)
- Solaris 10下遷移10G RAC (七)
- Solaris 10下遷移10G RAC (三)
- Solaris 10下遷移10G RAC (一)
- Solaris 10下遷移10G RAC (五)
- Oracle 10g RAC 資料儲存更換Oracle 10g
- AIX 5.3 Install Oracle 10g RAC 錯誤集錦AIOracle 10g
- Oracle 9i, 10g, and 11g RAC on Linux所需要的Hangcheck-Timer Module介紹OracleLinuxGC
- 保證RAC 24*7安全穩定執行秘籍之一(IO閃斷解決辦法)
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- 10G DG SWITCH OVER
- oracle 10g flashback databaseOracle 10gDatabase
- 【DG】MAA-RAC to RAC ADG配置
- 10G FGA的增強
- Scheduler in Oracle Database 10g(轉)OracleDatabase
- Oracle 10g 下載地址Oracle 10g
- oracle 10G特性之awrOracle 10g
- forall在10g新功能
- 【RAC】Oracle RAC如何修改心跳網路Oracle
- 【RAC】RAC更換心跳地址和RAC更換儲存主要步驟
- oracle RACOracle
- RAC and Grid
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- 【RAC】Oracle rac 如何修改公網及vipOracle
- 10g sqlplus的一個bugSQL
- 如何手工重建10g database consoleDatabase
- ISO 映象安裝oracle 10gOracle 10g
- [20190530]DISABLE TABLE LOCK(10g).txt
- [20190215]那個更快(10g).txt
- Oracle 10g 增刪節點Oracle 10g
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer
- RAC的理解
- goldengate + asm + racGoASM
- ORACLE RAC clusterwareOracle