ORACLE 11g R2 for SUSE 11集群双机部署
ORACLE 11g R2.03 rac 安装 for SUSE Linux 11
主机环境准备:
rac1:
Hostname:rac1
IP:192.168.1.1/24
rac1-priv: 192.168.2.1/24
ntp: 192.168.3.3
rac2:
Hostname:rac2
IP:192.168.1.3/24
rac1-priv: 192.168.2.2/24
ntp: 192.168.3.3
共享存储:
/dev/sdb 1G (锁盘,争议盘)
/dev/sdc 16G (共享数据盘)
/etc/hosts:
192.168.1.1 rac1 rac1
192.168.2.1 rac1-priv rac1-priv
192.168.1.3 rac2 rac2
192.168.2.3 rac2-priv rac2-priv
192.168.1.2 rac1-vip rac1-vip
192.168.1.4 rac2-vip rac2-vip
rac-scan rac-scan
下面的PACKAGE应该包含在Default-RPMs,需要确认
binutils-2.19-11.28 (x86_64)
glibc-2.9-13.2 (x86_64)
glibc-32bit-2.9-13.2 (x86_64)
ksh-93t-9.4 (x86_64)
libaio-0.3.104-140.22 (x86_64)
libaio-32bit-0.3.104-140.22 (x86_64)
libstdc++33-3.3.3-11.9 (x86_64)
libstdc++33-32bit-3.3.3-11.9 (x86_64)
libstdc++43-4.3.3_20081022-11.18 (x86_64)
libstdc++43-32bit-4.3.3_20081022-11.18 (x86_64)
libgcc43-4.3.3_20081022-11.18 (x86_64)
make-3.81-128.20 (x86_64)
下面的PACKAGE需要另外安装
noarch/linux-kernel-headers-2.6.27-2.22.noarch.rpm
gcc43-4.3.3_20081022-11.18.x86_64.rpm
glibc-devel-32bit-2.9-13.2.x86_64.rpm
libstdc++43-devel-4.3.3_20081022-11.18.x86_64.rpm
gcc43-4.3.3_20081022-11.18.x86_64.rpm
libgomp43-32bit-4.3.3_20081022-11.18.x86_64.rpm
gcc43-32bit-4.3.3_20081022-11.18.x86_64.rpm
gcc43-c++-4.3.3_20081022-11.18.x86_64.rpm
libaio-devel-0.3.104-140.22.x86_64.rpm
libaio-devel-32bit-0.3.104-140.22.x86_64.rpm
sysstat-8.1.5-7.8.x86_64.rpm
glibc-devel-2.9-13.2.x86_64.rpm
上述所有的PACKAGE,都可以在SLES 11 64-bit (x86_64) distribution media 中找到。
rpm -ivh oracleasm-support-2.1.7-1.SLE11.x86_64.rpm (下载)
rpm -ivh oracleasm-kmp-default-2.0.5_2.6.27.19_5-7.6.x86_64.rpm (光盘)
rpm -ivh oracleasm-2.0.5-7.6.x86_64.rpm (光盘)
rpm -ivh oracleasmlib-2.0.4-1.sle11.x86_64.rpm (下载)
vi /etc/sysctl.conf
# Disable response to broadcasts.
# You don't want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1
# enable route verification on all interfaces
net.ipv4.conf.all.rp_filter = 1
# enable ipV6 forwarding
#net.ipv6.conf.all.forwarding = 1
# increase the number of possible inotify(7) watches
fs.inotify.max_user_watches = 65536
fs.file-max = 6815744
kernel.shmall = 2007748608
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
vm.hugetlb_shm_group = 1000
# avoid deleting secondary IPs on deleting the primary IP
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
net.ipv4.ip_local_port_range = 9000 65500
sysctl –p
虚机vmx设置:需编辑加入:
disk.locking="FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.DataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
scsi1.present = "TRUE"
scsi1.sharedBus = "physical"
scsi1.virtualDev = "lsilogic"
vmci0.unrestricted = "TRUE"
scsi1:1.SharedBus="Virtual"
scsi1:1.shared="TRUE"
scsi1:1.mode = "independent-persistent"
scsi1:1.present = "TRUE"
scsi1:1.fileName = "rac1_2.vmdk"
scsi1:1.deviceType = "scsi-hardDisk"
scsi1:2.SharedBus="Virtual"
scsi1:2.shared="TRUE"
scsi1:2.mode = "independent-persistent"
scsi1:2.present = "TRUE"
scsi1:2.fileName = "rac1_3.vmdk"
scsi1:2.deviceType = "scsi-hardDisk"
Oracle安装用户和组设置
创建用户和组
建立Oracle安装目录组:
/usr/sbin/groupadd –g 1000 oinstall
建立Oracle ASMDBA组:
/usr/sbin/groupadd -g 1002 asmadmin
/usr/sbin/groupadd -g 1003 asmdba
/usr/sbin/groupadd -g 1004 asmoper
/usr/sbin/groupadd -g 1001 dba
建立Grid安装用户grid:
#mkdir /home/grid
#/usr/sbin/useradd -u 1001 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid/ grid
建立Oracle安装用户oracle:
/usr/sbin/useradd -u 1000 -g oinstall -G dba,asmdba -d /home/oracle/ oracle
用户shell limit设置
1 、修改/etc/security/limits.conf
Oracle:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
Grid:
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
2、修改/etc/pam.d/login,如果不存在,则创建该文件
session required pam_limits.so
3、修改default shell startup file
数据库安装用户grid.profile
.profile文件内容如下:
数据库安装用户oracle.profile
.profile文件内容如下:
Oracle inventory 目录
Grid Infrastructure BASE 目录
Grid Infrastructure Home 目录
Oracle Base 目录
Oracle Rdbms Home 目录
chown -R grid:oinstall /oracle
ASM配置:
双机建立信任
(ORACLE用户建立同样的各节点信任关系)
安装GRID
选择skip software updates,next
选择Advanced Installation:
忽略,next
如果需要重新运行root.sh,需要:
/oracle/app/grid/crs/install/rootcrs.pl -verbose -deconfig -force
GRID安装完毕。
添加dg:
#su - grid
>export ORACLE_SID=+ASM1
>sqlplus “/as sysasm”
Sql> create diskgroup DATADG external redundancy disk 'ORCL:VOL2';
Sql>exit
>exit
安装DB:
#xhost +
#su – oracle
>export DISPLAY=:0.0
>cd /home/oracle/soft
>./runInstaller
设置系统用户密码,指定DG
关于ORA-12162
Linux
1、启动ORACLE监听
(至此监听启动完成);
LSNRCTL> exit
2、启动数据库
(至此数据库启动)
SQL> exit
以上资料来自社区会员分享
您也可以点击阅读原文到社区下载文档(可能需要社区金币)
长按下图二维码关注
也可以直接搜索公众号名称“AIX专家俱乐部”或微信号“AIXChina”关注