oracle 11G RAC 安裝前準備和注意事項
VBoxManage createhd --filename /Volumes/mechine/VMware/virtualBox/11gsharestorage/asm1.vdi --size 2048 --format VDI --variant Fixed
VBoxManage createhd --filename /Volumes/mechine/VMware/virtualBox/11gsharestorage/data1.vdi --size 40960 --format VDI --variant Fixed
VBoxManage storageattach Cent5_8_64bit-rac1 --storagectl 'SATA' --port 1 --device 0 --type hdd --medium /Volumes/mechine/VMware/virtualBox/11gsharestorage/asm1.vdi --mtype shareable
VBoxManage storageattach Cent5_8_64bit-rac1 --storagectl "SATA" --port 2 --device 0 --type hdd --medium /Volumes/mechine/VMware/virtualBox/11gsharestorage/data1.vdi --mtype shareable
VBoxManage modifyhd /Volumes/mechine/VMware/virtualBox/11gsharestorage/asm1.vdi --type shareable
VBoxManage modifyhd /Volumes/mechine/VMware/virtualBox/11gsharestorage/data1.vdi --type shareable
VBoxManage storageattach Cent5_8_64bit-rac2 --storagectl 'SATA' --port 1 --device 0 --type hdd --medium /Volumes/mechine/VMware/virtualBox/11gsharestorage/asm1.vdi --mtype shareable
VBoxManage storageattach Cent5_8_64bit-rac2 --storagectl "SATA" --port 2 --device 0 --type hdd --medium /Volumes/mechine/VMware/virtualBox/11gsharestorage/data1.vdi --mtype shareable
注意centos6以上要執行
--service NetworkManager stop
--chkconfig --level 2345 NetworkManager off
#public ip
192.168.56.91 rac1
192.168.56.92 rac2
#private ip
192.168.58.91 rac1-priv
192.168.58.92 rac2-priv
#vip
192.168.56.93 rac1-vip
192.168.56.94 rac2-vip
#scan ip
192.168.56.95 racscan
# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr=1048576
透過getconf獲取分頁的大小,用來計算SHMALL的合理設定值:
SQL> select 32*1024*1024*1024/4096 from dual;
32*1024*1024*1024/4096
----------------------
8388608
對於32G的記憶體,4K分頁大小的系統而言,SHMALL的值應該設定為8388608。
shmmax設定為實體記憶體大小
#vi /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
#vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required
# vi /etc/rc.local
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180
二.建立組和使用者
groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
groupadd -g 1003 asmadmin
groupadd -g 1004 asmoper
groupadd -g 1005 asmdba
useradd -u 1000 -g oinstall -G dba,asmdba,oper oracle
useradd -u 1001 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /u01/grid
mkdir -p /u01/gridhome
mkdir -p /u01/oracle
chown -R grid:oinstall /u01/grid
chmod -R 755 /u01/grid
chown -R grid:oinstall /u01/gridhome
chmod -R 755 /u01/gridhome
chown -R oracle:oinstall /u01/oracle
chmod -R 755 /u01/oracle
四.停止ntp服務
service ntpd stop
chkconfig ntpd off
mv /etc/ntp.conf /etc/ntp.
mv /var/run/ntpd.pid /var/run/ntpd.
rpm -qa | grep binutils-2.17.50.0.6
rpm -qa | grep compat-libstdc++-33-3.2.3
rpm -qa | grep compat-libstdc++-33-3.2.3 (32 bit)
rpm -qa | grep elfutils-libelf-0.125
rpm -qa | grep elfutils-libelf-devel-0.125
rpm -qa | grep gcc-4.1.2
rpm -qa | grep gcc-c++-4.1.2
rpm -qa | grep glibc-2.5-24
rpm -qa | grep glibc-2.5-24 (32 bit)
rpm -qa | grep glibc-common-2.5
rpm -qa | grep glibc-devel-2.5
rpm -qa | grep glibc-devel-2.5 (32 bit)
rpm -qa | grep glibc-headers-2.5
rpm -qa | grep ksh-20060214
rpm -qa | grep libaio-0.3.106
rpm -qa | grep libaio-0.3.106 (32 bit)
rpm -qa | grep libaio-devel-0.3.106
rpm -qa | grep libaio-devel-0.3.106 (32 bit)
rpm -qa | grep libgcc-4.1.2
rpm -qa | grep libgcc-4.1.2 (32 bit)
rpm -qa | grep libstdc++-4.1.2
rpm -qa | grep libstdc++-4.1.2 (32 bit)
rpm -qa | grep libstdc++-devel 4.1.2
rpm -qa | grep make-3.81
rpm -qa | grep sysstat-7.0.2
rpm -qa | grep unixODBC-2.2.11 (32-bit) or later
rpm -qa | grep unixODBC-devel-2.2.11 (64-bit) or later
rpm -qa | grep unixODBC-2.2.11 (64-bit) or later
安裝asm包
CentOS6.5
yum -y install kmod-oracleasm
warning: /u01/oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
warning: /u01/oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
CentOS5
warning: oracleasm-support-2.1.7-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
warning: oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-308.el########################################### [100%]
warning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
warning: oracleasm-2.6.18-308.el5-debuginfo-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-308.el########################################### [100%]
磁碟分割槽
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 5221.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-5221, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221):
Using default value 5221
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
--2個節點全部執行
註冊asm(兩個節點)
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 <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
初始化ASM(兩個節點)
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
建立asm磁碟(一個節點)
Writing disk header: done
Instantiating disk: done
Writing disk header: done
Instantiating disk: done
DATA1
OCR1
完成後,在另一個節點上
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "OCR1"
Instantiating disk "DATA1"
DATA1
OCR1
RHEL使用裸裝置
1)獲取需要繫結為ASM Disk的磁碟uuid,例如/dev/mpathc 與/dev/mpathd;2個節點分別執行並比對UUID是否是共享磁碟
1ATA_VBOX_HARDDISK_VB40857a49-8ca6587f
1ATA_VBOX_HARDDISK_VB181a0e3f-47677003
2)2個節點編寫udev rules檔案(RESULT為uuid,NAME部分可以自己命名其餘不需要改動)
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB40857a49-8ca6587f", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB181a0e3f-47677003", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660"
linux 5 多路徑繫結
vi /etc/rc.local
chown grid.asmadmin /dev/mapper/crs*
chmod 660 /dev/mapper/crs*
chown grid.asmadmin /dev/mapper/data[1-3]
chmod 666 /dev/mapper/data[1-3]
六.oracle使用者和grid分別建立使用者等效性
oracle:
cd /home/oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
ssh rac2 date;ssh rac1 date
ssh rac2-priv date;ssh rac1-priv date
grid:
cd /home/grid
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
ssh rac2 date;ssh rac1 date
ssh rac2-priv date;ssh rac1-priv date
時間同步
ntpdate
ntpdate
ntpdate
七.oracle使用者和grid使用者修改.bash_profile
oracle:
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/11g
export ORACLE_SID=RACDB1
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/11g
export ORACLE_SID=RACDB2
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
grid:
export ORACLE_BASE=/u01/grid
export ORACLE_HOME=/u01/gridhome/11g
export ORACLE_SID=+ASM1
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export ORACLE_BASE=/u01/grid
export ORACLE_HOME=/u01/gridhome/11g
export ORACLE_SID=+ASM2
PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
八.安裝Oracle Grid Infrastructure
安裝cvuqdisk rpm包,這個包在Oracle Grid Infrastructure安裝介質中
以root使用者登入
export CVUQDISK_GRP=oinstall
# yum groupinstall "GNOME Desktop Environment"(CentOS 5.x安裝GNOME桌面環境)
# yum groupinstall "X Window System" "Desktop"(CentOS 6.x安裝GNOME桌面環境)
ERROR:
PRVF-7617 : Node connectivity between
解決:
service iptables stop
chkconfig --list | grep iptables
chkconfig --level 345 iptables off
關閉selinux
setenforce 0
/etc/selinux/config
將SELINUX=enforcing改為SELINUX=disabled
報錯
/u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1:cannot open shared object file: No such file or directory
解決思路:
yum -y install compat-libcap1
或者:
確定libcap包已安裝
建立連線
在/lib64
ln -s libcap.so.2.16 libcap.so.1
九 忽略錯誤:
device checks for asm
oracle cluster verification utility
11gR2 grid安裝最後報錯[INS-20802] Oracle Cluster Verification Utility failed
日誌中也報錯:
INFO: Checking Single Client Access Name (SCAN)...
INFO: Checking name resolution setup for "rac-scan"...
INFO: ERROR:
INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "rac-scan"
INFO: ERROR:
INFO: PRVF-4657 : Name resolution setup check for "rac-scan" (IP address: 192.168.0.20) failed
INFO: ERROR:
INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "rac-scan"
INFO: Verification of SCAN VIP and Listener setup failed
搜了一下發現老楊(yangtingkun)的文章中也提到了這個錯誤:
F:RHEL5.532oracle_patchyangtingkun 安裝Oracle11_2 RAC for Solaris10 sparc64(二).mht
老楊在文章的最後提到:
導致這個錯誤的原因是在/etc/hosts中配置了SCAN的地址,嘗試ping這個地址資訊,如果可以成功,則這個錯誤可以忽略。
我嘗試ping scan ip可以ping通,所以暫時也就忽略了這個錯誤。
-----
11gR2 RAC安裝中的Task resolv.conf Integrity問題
沒有配置DNS的話 檢測/etc/resolv.conf 這步驟是會失敗的, 但是不影響安裝 ,直接 ignore 即可
安裝rdbms提示:
single client access name scan
#開啟歸檔
關閉其他節點,保留一個節點
SQL> alter system set db_recovery_file_dest='+data2' scope=spfile;
System altered.
SQL> alter system set db_recovery_file_dest_size=2048G scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 3.0331E+10 bytes
Fixed Size 2268032 bytes
Variable Size 4831839360 bytes
Database Buffers 2.5434E+10 bytes
Redo Buffers 63033344 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Next log sequence to archive 9
Current log sequence 9
SQL> show parameter recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +data2
db_recovery_file_dest_size big integer 2048G
recovery_parallelism integer 0
RACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = racscan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RACDB)
)
)
刪除rac
rm -rf /etc/oracle/;rm -f /etc/init.d/init.cssd;rm -f /etc/init.d/init.crs;rm -f /etc/init.d/init.crsd;rm -f /etc/init.d/init.evmd;rm -f /etc/rc2.d/K96init.crs;rm -f /etc/rc2.d/S96init.crs;rm -f /etc/rc3.d/K96init.crs;rm -f /etc/rc3.d/S96init.crs;rm -f /etc/rc5.d/K96init.crs;rm -f /etc/rc5.d/S96init.crs;rm -Rf /etc/oracle/scls_scr;rm -f /etc/inittab.crs;rm -f /etc/ohasd;rm -f /etc/oraInst.loc;rm -f /etc/oratab;rm -rf /tmp/.oracle;rm -rf /tmp/ora*;rm -rf /var/tmp/.oracle;rm -rf /tmp/CVU*;rm -rf /tmp/Ora*;rm -rf /home/grid/.oracle
rm -rf /u01/grid/*;rm -rf /u01/gridhome/*
mv /etc/init.d/init.ohasd /etc/init.d/init.ohasd.bak
init 6
ps -ef | grep crs;ps -ef | grep evm;ps -ef | grep css
dd if=/dev/zero of=/dev/mapper/crs bs=1M count=50000
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2123960/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- BIEE安裝前準備及注意事項
- oracle 11g RAC 安裝前準備指令碼Oracle指令碼
- oracle rac安裝配置注意事項Oracle
- Oracle 11G RAC叢集安裝(1)——安裝前的準備Oracle
- Redhat 6 Oracle 11g RAC安裝注意事項彙總RedhatOracle
- Linux 安裝11g RAC 前準備工作Linux
- 在WINDOWS上安裝ORACLE RAC的注意事項WindowsOracle
- RAC安裝之一 安裝前準備
- Oracle11g RAC+ASM安裝前儲存規劃注意事項OracleASM
- 10G RAC 安裝 注意事項
- RHEL5 Oracle 11G R2 RAC 靜默安裝 (一) GI安裝前 準備Oracle
- Openfiler+RAC的安裝之六--安裝前的準備工作
- jdk安裝注意事項JDK
- samba安裝 注意事項Samba
- rac安裝注意事項;window2003+vmware
- 新車提車注意事項準備工作
- Oracle 10g的安裝步驟和注意事項(轉)Oracle 10g
- 安裝__DB、ASM注意事項ASM
- DUBBO安裝配置注意事項
- ORACLE 11G 安裝注意Oracle
- JDK1.7安裝和配置及注意事項JDK
- oracle 資料庫安裝前環境檢查和準備工作Oracle資料庫
- 安裝Oracle RAC 11gOracle
- 用xmanager 客戶端安裝oracle時注意事項客戶端Oracle
- RedHat 5.1上安裝Oracle 10g 注意事項RedhatOracle 10g
- redhat as5 安裝 oracle 10g注意事項RedhatOracle 10g
- TokuDB的安裝及注意事項
- MySQL 安裝後的注意事項MySql
- 安裝icinga注意事項
- MYSQL 安裝維護注意事項MySql
- GNU make安裝注意事項(轉)
- PbootCMS怎麼安裝?注意事項boot
- mysql01_安裝前準備MySql
- 安裝 Nuxt.js 的步驟和注意事項UXJS
- OS__安裝、引數、注意事項、驗證事項
- SVN安裝配置及安全注意事項
- 安裝mysql-python注意事項MySqlPython
- weblogic安裝注意事項_linuxWebLinux