在 VMWare ESX4.1 中以 Oracle Linux5.5(x64) 安装 3 节点 Oracle 11gr2
21. 安装 Oracle 软件用典型,选服务器类,选 RAC在 典型安装配置 页:软件位置 /u01/app/oracle/product/11.2.0/db_1gobal data
1. 规划 IP :
RAC1 IP 10.1.1.151
RAC1 VIP 10.1.1.161
RAC1 Priv-IP 10.1.0.1
RAC2 IP 10.1.1.152
RAC2 VIP 10.1.1.162
RAC2 Priv-IP 10.1.0.2
RAC3 IP 10.1.1.153
RAC3 VIP 10.1.1.163
RAC3 Priv-IP 10.1.0.3
SCAN IP 10.1.1.170
2. 设置一个新的虚拟机,设置内存为 3G (虚拟机最好不要少于 2G 内存,不然可能会出些意想不到的问题),硬盘为 25G ,增加一个网卡后安装 Oracle Linux5.5 ,全部默认安装。关闭 SELinux ,关闭防火墙。
3. 增加组及用户
groupadd -g 1000 oinstall
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle
passwd oracle
4. 检查 rpm 包
# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"|\
egrep "binutils|compat-libstdc++|elfutils-libelf|gcc|glibc|kernel-headers|ksh|libaio|libgcc|libgomp|libstdc|make|sysstat|unixODBC|pdksh"|sort
安装 rpm 包,在 VM 中连接上 Linux 的安装 DVD
执行以下命令(注,如所缺的不止这些包,请另行再安装,所要的包可以参考 Oracle 的标准安装文档)
mount -r -t iso9660 /dev/cdrom /media
cd /media/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh gcc-4* --nodeps
rpm -Uvh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm --nodeps
rpm -Uvh glibc-devel-2.5* --nodeps
rpm -Uvh glibc-headers-2.5* --nodeps
rpm -Uvh gcc-c++-4.* --nodeps
# For OEL, use relevant versions of the following packages from your media.
rpm -Uvh oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm \
oracleasm-support-2.1.3-1.el5.x86_64.rpm \
oracleasmlib-2.0.4-1.el5.x86_64.rpm # 必须注意,这个文件在 DVD 中没有,如果没有安装这个文件,会在图形界面上找不到 ASM 盘的。
可以到这个网站上下载:
进入 grid (在 Oracle 网站上下载)的安装目录,进行 rpm 目录
rpm -Uvh cvuqdisk*
5. 编辑 /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
# Public Network -(eth0)
10.1.1 .151 rac1.localdomain rac1
10.1.1 .152 rac2.localdomain rac2
10.1.1 .153 rac3.localdomain rac3
#Private Network -(eht1)
10.1.0 .1 rac1-priv.localdomain rac1-priv
10.1.0 .2 rac2-priv.localdomain rac2-priv
10.1.0 .3 rac3-priv.localdomain rac3-priv
#Public Virtual IP -(eth0:1)
10.1.1 .161 rac1-vip.localdomain rac1-vip
10.1.1 .162 rac2-vip.localdomain rac2-vip
10.1.1 .163 rac3-vip.localdomain rac3-vip
#Note. The SCAN address should not really be defined in the hosts file.
#Instead is should be defined on the DNS to round-robin
#between 3 addresses on the same subnet as the public IPs.
#For this installation, we will compromise and use the hosts file.
#Single Client Access Name(SCAN)
10.1.1 .170 rac-scan.localdomain rac-scan
修改网络设置中的 DNS - > HostName 改为 rac1.localdomain
增加 ip , priv-ip 地址
6. 编辑 /etc/sysctl.conf ,,在文件最后加上(下同)
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
加载上述设置
#/sbin/sysctl -p