VM 6+linux4.4+裸裝置+ORACLE10G RAC 安裝

gaopengtttt發表於2011-01-18
原創 未完
----安裝虛擬機器
1、安裝虛擬機器VMware Workstation 6
2、安裝作業系統LINUX AS 4.4
3、新增2塊網路卡,我使用的時HOSTNONLY方式
4、新增共享硬碟,我加入了一個盤為40G,一個30G,然後再兩個虛擬機器的vmdk檔案種加入引數
disk.locking = "FALSE"
scsi1.sharedBus = "virtual"
----配置系統
5、登陸作業系統建立使用者
# groupadd -g 500 oinstall
# groupadd -g 501 dba
# useradd -u 500 -d /home/oracle -g "oinstall"  –G "dba" -m  -s /bin/bash oracle
6、配置bash_profile
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_SID=pptest1
7、修改SYSCTL.COF
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
sysctl.conf 引數
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmall = 209715
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
8 配置HOSTS
127.0.0.1               localhost.localdomain localhost
192.168.0.111           pptest1
192.168.0.112           pptest2
10.10.0.1               pt1_priv
10.10.0.2               pt2_priv
192.168.0.121           pt1_vip
192.168.0.122           pt2_vip
----配置CRS軟體---
9 配置SSH信任
[ex0044]$ /usr/bin/ssh-keygen -t dsa
[ex0045]$ /usr/bin/ssh-keygen -t dsa
[ex0044]$ ssh ex0044 "cat ~/.ssh/id_dsa.pub" >> \ ~/.ssh/authorized_keys
[ex0044]$ ssh ex0045 "cat ~/.ssh/id_dsa.pub" >> \ ~/.ssh/authorized_keys
ex0044]$ scp ~/.ssh/authorized_keys ex0045:/home/oracle/.ssh/
10 配置裸裝置
分割槽
fdisk
     RAW1 1G system /dev/sdb1
     RAW2 1G SYSAUX /dev/sdb2
     RAW5 1G UNDO1 /dev/sdb5
     RAW6 1G UNDO2 /dev/sdb6
     RAW7 500M EXAMPLE /dev/sdb7
     RAW8 3G USER /dev/sdb8
     RAW9 150M LOG11 /dev/sdb9
     RAW10 150M LOG12 /dev/sdb10
     RAW11 150M LOG13 /dev/sdb11
     RAW12 150M LOG21 /dev/sdb12
     RAW13 150M LOG22 /dev/sdb13
     RAW14 150M LOG23 /dev/sdb14
     RAW15 150M CONTROLFILE1 /dev/sdb15
     RAW24 150M CONTROLFILE2 /dev/sdc12
     RAW17 150M CONTROLFILE3 /dev/sdc5
     RAW18 500M TEMP /dev/sdc6
     RAW19 5M   SPFILE /dev/sdc7
     RAW20 5M   PASSWORD FILE /dev/sdc8
     RAW21 200M OCR /dev/sdc9
     RAW22 50M  VOTING DISK /dev/sdc10
     RAW23 5g   PP    /DEV/sdc11
編輯 /etc/sysconfig/rawdevices 加入繫結資訊
/dev/raw/raw1 /dev/sda1
重啟RAW服務
# /sbin/service rawdevices restart
設定許可權
# chown root:dba /dev/raw/rawn
# chmod 640 /dev/raw/rawn
# chown oracle:oinstall /dev/dev/raw1
# chmod 660 /dev/raw/rawn
11、配置 hangcheck-timer
# vi /etc/rc.local
/sbin/insmod hangcheck-timer hangcheck_tick=30\hangcheck_margin=180
12、安裝CRS
下面是遇到的問題
1、遇到問題
PRKC-1044
解決
Solution
1. Run ssh to both the hostname, and the fully qualified hostname, before OUI is run.
Eg. in the example cluster, you would run the following on each node before starting the install:
$ ssh abc001 date
$ ssh abc001.def.ghi.com date
$ ssh abc002 date
$ ssh abc002.def.ghi.com date
2. When prompted, confirm that YES, the key should be added to the database. 
3. When the commands produce no other output/prompts than the date:
$ ssh abc001 date
Fri May 1 11:30:47 UTC 2009
$ ssh abc001.def.ghi.com date
Fri May 1 11:30:48 UTC 2009
$ ssh abc002 date
Fri May 1 11:30:50 UTC 2009
$ ssh abc002.def.ghi.com date
Fri May 1 11:32:50 UTC 2009
then retry the install.
2、遇到問題
The installer has detected the existence of 10g Oracle Clusterware on th
e remote node, pptest2, however, 10g Oracle Clusterware does not exist on the lo
cal node.  If you wish to upgrade and existing 10g Release 2, then you must star
t the installer on a node local to the older 10g Oracle Clusterware installation
. If you want to create a new cluster, you must choose a set of nodes that are n
ot part of an existing cluster.
解決刪除 /etc/oracle/ocr.loc
 
3、遇到問題
PRKC-1002
解決
檢視TIME是否同步
4、遇到問題
[root@pptest2 crs]# sh root.sh
WARNING: directory '/home/oracle/product/10.2.0' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
日誌顯示
Setting the permissions on OCR backup directory
Setting up NS directories
Failed to upgrade Oracle Cluster Registry configuration
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle.  All rights reserved.
2011-01-18 05:28:45.028: [ OCRCONF][3086898880]ocrconfig starts...
2011-01-18 05:28:45.028: [ OCRCONF][3086898880]Upgrading OCR data
2011-01-18 05:28:45.038: [ OCRCONF][3086898880]OCR already in current version.
2011-01-18 05:28:45.071: [ OCRCONF][3086898880]Failed to call clsssinit (21)
2011-01-18 05:28:45.071: [ OCRCONF][3086898880]Failed to make a backup copy of OCR
2011-01-18 05:28:45.071: [ OCRCONF][3086898880]Exiting [status=failed]...
解決
Solution
To implement the solution, please execute the following steps:

Note: The following steps is for Sun Solaris

1. Determine which disk devices will be used store the OCR and voting disk file. Use the format
command to list the devices, and select the appropriate device. Create a 120 Mb partition and
label the disk. Note, the disk partition to be used must skip the first 1Mb to avoid overwriting
the disk VTOC.
Repeat this step for the voting disk, using 20Mb for the disk device.
2. Make sure the other nodes can see those devices. If the other nodes see those devices at a
different path, then common symbolic links or mknod command must be used to point to the same
location.
3. Initialize the devices using dd.
dd if=/dev/zero f=/dev/rdsk/c3t4d12s6 bs=125829120 \
count=1
dd if=/dev/zero f=/dev/rdsk/c3t4d15s6 bs=20971520 \
count=1
4. Change the permissions and ownership on the two devices.
OCR disk device
chown root:dba /dev/rdsk/c3t4d12s6
chmod 660 /dev/rdsk/c3t4d12s6
Voting disk
chown oracle:dba /dev/rdsk/c3t4d15s6
chmod 660 /dev/rdsk/c3t4d15s6
---安裝DATABASE 軟體---

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-684072/,如需轉載,請註明出處,否則將追究法律責任。

相關文章