linux 10201 ASM RAC 安装+升级到10205
准备环境的时 ,要4个对外IP,2个对内IP
不超过2T,,一般都用OCFS
高端存储适合用ASM
linux10G安装的时候,安装的机器时间要小于等于(如果是等于要严格等于)第二个机器的时间(只有linux 10G会有这个问题),不然会报错,拷贝空值什么的。
出现此错误,说明是时间问题,
hosts里面要注意的地方:
1)127.0.0.1 那一行不能删除。
2)主机名要小写,不能大写。
3)不能加下划线。
1.安装系统,把所有的开发包全部安装上
关掉防火墙和SELinux
yum -y install compat-libstdc++*
yum -y install elfutils-libelf-devel*
yum -y install elfutils-libelf-devel-static*
yum -y install gcc*
yum -y install gcc-c++*
yum -y install glibc*
yum -y install glibc-common*
yum -y install glibc-devel*
yum -y install glibc-headers*
yum -y install kernel-headers*
yum -y install ksh*
yum -y install libaio*
yum -y install libaio-devel*
yum -y install libgcc*
yum -y install libgomp*
yum -y install libstdc++*
yum -y install libstdc++-devel*
yum -y install make*
yum -y install sysstat*
yum -y install unixODBC*
yum -y install unixODBC-devel*
yum -y install libXp*
2.配置核心参数
vi /etc/sysctl.conf
kernel.core_uses_pid = 1
fs.file-max = 65536
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
kernel.shmmni = 4096
kernel.sem = 500 64000 100 128
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
修改完执行此命令 : sysctl -p
vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
之后,执行:$ulimit验证一下.
vi /etc/csh.login
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
vi /etc/pam.d/login
session required pam_limits.so
vi /etc/security/limits.conf
oracle soft nofile 655360
oracle hard nofile 635360
oracle soft nproc 10240
oracle hard nproc 16384
3.配置网络
127.0.0.1 linux1 localhost.localdomain localhost
需要将其删除成如下(注意上面的linux1被删除):
127.0.0.1 localhost.localdomain localhost
如果 RAC 节点名出现在回送地址中,您在 RAC 安装期间将接收到以下错误信息:
ORA-00603:ORACLE server session terminated by fatal error
或
ORA-29702:error occurred in Cluster Group Service operation
在RAC1中,需要配置两个网段(RAC2也一样)
192.168.56.101 是公有网段
10.10.10.11 是私有网段
在RAC1中,配置两个文件可以达到修改IP的目的(RAC2中也如此类似操作)
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=08:00:27:65:d4:be
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPADDR=192.168.56.101
NETMASK=255.255.255.0
GATEWAY=192.168.56.1
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
HWADDR=08:00:27:5f:b7:85
IPADDR=10.10.10.11
NETMASK=255.255.255.0
之后,重启IP,使之生效。
service network restart
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
#rac1
192.168.56.101 rac1
192.168.56.111 rac1vip
10.10.10.11 rac1priv
#rac2
192.168.56.102 rac2
192.168.56.222 rac2vip
10.10.10.22 rac2priv
4.创建用户,用户组
/usr/sbin/groupadd -g 1000 oinstall
/usr/sbin/groupadd -g 1200 dba
/usr/sbin/useradd -u 555 -g oinstall -G dba oracle
两边的用户id,组id 要一样
mkdir -p /u01/app/oracle/product/10.2/db_1
mkdir -p /u01/app/oracle/product/10.2/crs
chown -R oracle:oinstall /u01
chmod -R 775 /u01
vi /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2/crs
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$PATH
5 . 配置互信(一定要是oracle用户,两个节点都要做。)
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
把4个文件合成一个文件
注意权限要是是644
chmod 644 authorized_keys
在节点RAC2进行的操作
[oracle@RAC2 ~]$ ls -a
. .bash_history .bash_profile .emacs .mozilla .viminfo
.. .bash_logout .bashrc .kde .ssh .Xauthority
[oracle@RAC2 ~]$ cd .ssh
[oracle@RAC2 .ssh]$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub
[oracle@RAC2 .ssh]$ scp id_dsa.pub rac1:/home/oracle/.ssh/id_dsa.pub2
oracle@rac1's password:
id_dsa.pub 100% 601 0.6KB/s 00:00
[oracle@RAC2 .ssh]$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub known_hosts
[oracle@RAC2 .ssh]$ scp id_rsa.pub rac1:/home/oracle/.ssh/id_rsa.pub2
oracle@rac1's password:
id_rsa.pub
再到RAC1节点
cat id_dsa.pub id_dsa.pub2 id_rsa.pub id_rsa.pub2 > authorized_keys
scp authorized_keys rac2:/home/oracle/.ssh
之后要测试一下(如果都不需要密码,得到时间后。就说明ssh 对等性配置成功。)
[oracle@rac1 ~]$ ssh rac1 date
[oracle@rac1 ~]$ ssh rac2 date
Sat Sep 14 16:03:58 CST 2013
[oracle@rac1 ~]$ ssh rac1priv date
Sat Sep 14 16:04:59 CST 2013
[oracle@rac1 ~]$ ssh rac2priv date
The authenticity of host 'rac2priv (10.10.10.22)' can't be established.
RSA key fingerprint is db:ad:62:77:5a:b5:d6:8f:c6:55:a9:64:61:9b:39:bc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2priv,10.10.10.22' (RSA) to the list of known hosts.
Sat Sep 14 16:05:09 CST 2013
[oracle@rac2 ~]$ ssh rac1 date
Sat Sep 14 16:06:54 CST 2013
[oracle@rac2 ~]$ ssh rac2 date
Sat Sep 14 16:09:30 CST 2013
[oracle@rac2 ~]$ ssh rac1priv date
Sat Sep 14 16:09:55 CST 2013
[oracle@rac2 ~]$ ssh rac2priv date
The authenticity of host 'rac2priv (10.10.10.22)' can't be established.
RSA key fingerprint is db:ad:62:77:5a:b5:d6:8f:c6:55:a9:64:61:9b:39:bc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2priv,10.10.10.22' (RSA) to the list of known hosts.
Sat Sep 14 16:10:03 CST 2013
6.创建共享裸设备
首先在rac3和rac4添加一块共享存储盘。
[root@rac3 ~]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksId System
/dev/sda1* 1 13 10439183 Linux
/dev/sda2 14 10448281507+ 8e Linux LVM
Disk /dev/sdb: 16.8 GB, 16862150656 bytes
255 heads, 63 sectors/track, 2050 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@rac4 ~]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/sda1 *1 13 10439183 Linux
/dev/sda2 14 10448281507+ 8e Linux LVM
Disk /dev/sdb: 16.8 GB, 16862150656 bytes
255 heads, 63 sectors/track, 2050 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@rac3 ~]# fdisk /dev/sdb
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 2050.
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): d
No partition is defined yet!
Command (m for help): n
Command action
eextended
pprimary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2050, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2050, default 2050): 300m
Command (m for help): n
Command action
eextended
pprimary partition (1-4)
p
Partition number (1-4): 2
First cylinder (301-2050, default 301):
Using default value 301
Last cylinder or +size or +sizeM or +sizeK (301-2050, default 2050): 600m //注意在这里一定要注意600这个值,这里的分区取值是600-前面
// 的300 ,所以是300,而不是600。
Command (m for help): n
Command action
eextended
pprimary partition (1-4)
p
Partition number (1-4): 3
First cylinder (601-2050, default 601):
Using default value 601
Last cylinder or +size or +sizeM or +sizeK (601-2050, default 2050):
Using default value 2050
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac3 raw]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksId System
/dev/sda1 *1 13 10439183 Linux
/dev/sda2 14 10448281507+ 8e Linux LVM
Disk /dev/sdb: 16.8 GB, 16862150656 bytes
255 heads, 63 sectors/track, 2050 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksId System
/dev/sdb1 1 3002409718+ 83 Linux
/dev/sdb2 301 6002409750 83 Linux
/dev/sdb3 601 205011647125 83 Linux
[root@rac4 raw]# fdisk /dev/sdb
The number of cylinders for this disk is set to 2050.
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)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac4 raw]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksId System
/dev/sda1 *1 13 10439183 Linux
/dev/sda2 14 10448281507+ 8e Linux LVM
Disk /dev/sdb: 16.8 GB, 16862150656 bytes
255 heads, 63 sectors/track, 2050 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksId System
/dev/sdb1 1 3002409718+ 83 Linux
/dev/sdb2 301 6002409750 83 Linux
/dev/sdb3 601 205011647125 83 Linux
[root@rac3 ~]# cd /etc/udev/rules.d
[root@rac3 rules.d]# ls
05-udev-early.rules 60-pcmcia.rules 90-alsa.rules
40-multipath.rules 60-raw.rules 90-dm.rules
50-udev.rules 60-wacom.rules 90-hal.rules
51-hotplug.rules 61-uinput-stddev.rules 95-pam-console.rules
60-libsane.rules 61-uinput-wacom.rules 98-kexec.rules
60-net.rules 85-pcscd_ccid.rules bluetooth.rules
[root@rac3 rules.d]# vi 60-raw.rules
[root@rac3 rules.d]# cat 60-raw.rules
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdb2", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sdb3", RUN+="/bin/raw /dev/raw/raw4 %N"
KERNEL=="raw[1-9]", OWNER="oracle", GROUP="oinstall", MODE="0660"
[root@rac3 rules.d]# start_udev
Starting udev: [ OK ]
[root@rac3 rules.d]# ls -l /dev/raw
total 0
crw-rw---- 1 oracle oinstall 162, 1 Sep 17 10:21 raw1
crw-rw---- 1 oracle oinstall 162, 3 Sep 17 10:21 raw3
crw-rw---- 1 oracle oinstall 162, 4 Sep 17 10:21 raw4
[root@rac4 rules.d]# fdisk /dev/sdb
The number of cylinders for this disk is set to 2050.
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)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac4 dev]# cd /etc/udev/
[root@rac4 udev]# ls
makedev.drules.d scripts udev.conf
[root@rac4 udev]# cd rules.d
[root@rac4 rules.d]# ls
05-udev-early.rules 60-net.rules 61-uinput-wacom.rules 95-pam-console.rules
40-multipath.rules 60-pcmcia.rules 85-pcscd_ccid.rules 98-kexec.rules
50-udev.rules 60-raw.rules 90-alsa.rules bluetooth.rules
51-hotplug.rules 60-wacom.rules 90-dm.rules
60-libsane.rules 61-uinput-stddev.rules 90-hal.rules
[root@rac4 rules.d]# vi 60-raw.rules
[root@rac4 rules.d]# more 60-raw.rules
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdb2", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sdb3", RUN+="/bin/raw /dev/raw/raw4 %N"
KERNEL=="raw[1-9]", OWNER="oracle", GROUP="oinstall", MODE="0660" //生产环境中一般都要加上这一句
[root@rac4 rules.d]# start_udev
Starting udev:[ OK ]
[root@rac4 rules.d]# cd /dev/raw
[root@rac4 raw]# ls
raw1 raw3raw4
[root@rac4 raw]# ll
total 0
crw-rw---- 1 oracle oinstall 162, 1 Sep 17 10:32 raw1
crw-rw---- 1 oracle oinstall 162, 3 Sep 17 10:32 raw3
crw-rw---- 1 oracle oinstall 162, 4 Sep 17 10:32 raw4
7,安装集群软件
注意:出现如下的时候,一定要注意改变一下目录的路径
改成如下所示(不能放在db_1,要放在crs):
当出现如下所示时
要改成如下所示:
当出现如下所示时
要改成如下所示
注意如下OCR和VOTE的存放方式:
到下面所示,会有提示执行两个脚本,两个节点都要执行这两个脚本
执行的顺序是:RAC3执行第一个脚本,RAC4执行第个脚本,RAC3执行第二个脚本,RAC4执行第二个脚本
出现如下,为正常:
执行上面的脚本,先别急着点OK,必须先执行以下步骤
用root用户
cd /u01/app/oracle/product/10.2/crs/bin
vi vipca加一行(两个节点都要做 )
unset LD_ASSUME_KERNEL
./oifcfg getif //查看是否有信息
./oifcfg setif -global eth0/192.168.56.0:public
./oifcfg setif -global eth1/10.10.10.0:cluster_interconnect
./vipca //在第一个节点上做
如果在第一个节点(第二个节点没事)出现下面所示,说明raw没有清除干净。(一定要用dd命令才能删除,不能用rm命令)
ddif=/dev/zero of=/dev/raw/raw1 bs=8192 count=100
8,安装数据库软件
9,升级集群软件和数据库软件
注意:这两个软件包是是同一个。
先升级集群软件,再升级数据库软件。
注意下面的一定要看清楚是集群软件还是数据库软件。
这里下面的是集群软件。我们选择先升级集群软件。
到这一步,一定要注意看清提示上说的,按照上面的步骤来做。
一定要看清楚里面说什么,不能退出。里面会提示执行脚本。
第一个节点执行完这两个脚本,然后再到第二个节点执行两个脚本。
10,升级完成,配监听(配完监听才能建库)
11,建库
dbca建库过程中, 遇到如下,注意,选 Select All
注意这里下面选择的是ASM方式。
注意下面这里的选择是pfile
注意下面这里的选择
linux 10201 ASM RAC 安装+升级到10205的更多相关文章
- linux 10201 ocfs RAC 安装+升级到10205
准备环境的时 ,要4个对外IP,2个对内IP 不超过2T,,一般都用OCFS 高端存储适合用ASM linux10G安装的时候,安装的机器时间要小于等于(如果是等于要严格等于)第二个机器的时间(只有l ...
- AIX 10201 ASM RAC安装+升级到10204
1:查看系统版本 [rac1:root:/hacmp/hacmp5.4/ha5.4/installp/ppc] oslevel -s 6100-06-06-1140 lslpp -al bos.adt ...
- AIX 10201 HA RAC 安装+升级到10204
1:查看系统版本 [rac1:root:/hacmp/hacmp5.4/ha5.4/installp/ppc] oslevel -s 6100-06-06-1140 lslpp -al bos.adt ...
- 【Oracle RAC】Linux系统Oracle11gR2 RAC安装配置详细过程V3.1(图文并茂)
[Oracle RAC]Linux系统Oracle11gR2 RAC安装配置详细过程V3.1(图文并茂) 2 Oracle11gR2 RAC数据库安装准备工作2.1 安装环境介绍2.2 数据库安装软件 ...
- 【Oracle RAC】Linux系统Oracle12c RAC安装配置详细记录过程V2.0(图文并茂)
[Oracle RAC]Linux系统Oracle12c RAC安装配置详细过程V2.0(图文并茂) 2 Oracle12c RAC数据库安装准备工作2.1 安装环境介绍2.2 数据库安装软件下载3 ...
- 【Oracle RAC】Linux系统Oracle18c RAC安装配置详细记录过程(图文并茂)
本文Oracle 18c GI/RAC on Oracle Linux step-by-step 的安装配置步骤,同时也包含dbca 创建数据库的过程. 1. 关闭SELINUX,防火墙vi /etc ...
- linux 11201(11203) ASM RAC 安装
注意:11G的RAC安装,如果升级,则会新建目录在放软件,原来的不删除,所以所需空间比较大. 1.安装系统,把所有的开发包全部安装上 关掉防火墙和SELinux yum -y install comp ...
- Linux 上Oracle RAC 10g 升级到 Oracle RAC 11g
了解如何在 Oracle Enterprise Linux 5 上逐步将 Oracle RAC 10g 第 2 版升级到 Oracle RAC 11g. Oracle 数据库 11g(即,新一代网格计 ...
- AIX 11203 ASM RAC安装
1:查看系统版本 [rac1:root:/hacmp/hacmp5.4/ha5.4/installp/ppc] oslevel -s 6100-06-06-1140 lslpp -al bos.adt ...
随机推荐
- YTU 2983: 小明的生机!
2983: 小明的生机! 时间限制: 1 Sec 内存限制: 128 MB 提交: 16 解决: 2 题目描述 小明陷入一个充满陷阱的密道之中,现在他要逃脱这里!到达密道的指定位置即可离开这处绝境 ...
- YTU 2892: I--免费看电影
2892: I--免费看电影 时间限制: 1 Sec 内存限制: 128 MB 提交: 30 解决: 12 题目描述 万象城星美影院开业1周年了,要举行为期一天的大酬宾,ACM队员准备去看电影.已 ...
- [原创]java导出word的5种方式
在网上找了好多天将数据库中信息导出到word中的解决方案,现在将这几天的总结分享一下.总的来说,java导出word大致有5种解决方案: 1:Jacob是Java-COM Bridge的缩写,它在Ja ...
- python-----贴图 和 报错:OSError: image file is truncated (8 bytes not processed)的处理
将一张图片贴到另一张图片上,代码如下: from PIL import Image import os from PIL import ImageFile ImageFile.LOAD_TRUNCAT ...
- 使用Visual Studio 利用WinGDB编译和远程调试嵌入式Linux的程序
写这篇文章的目的在于帮助那些既要使用Visual Studio编写程序又要开发和调试嵌入式Linux 程序的苦命程序员们! 第一步, 安装 WinGDB ,下载位置 http://www.wingd ...
- 使用jQuery的tab控件
以前写winform程序的时候tab控件是非常容易使用的,写网页时确费了我不少劲,主要原因是jQuery的混乱. 有很多前端控件都提供tab,像bootstrap等,这里只说jQuery的. 下载相应 ...
- jquery datatable无数据提示不居中显示
原文地址:https://www.jianshu.com/p/fc4784d11722 昨天遇到一个问题,datatable生成的表格没有数据,但是“No data found”没有居中,根本原因是c ...
- json知识笔记
1.全称:JavaScript Object Notation 2.数据格式 3. 数据结构-object String+基本类型(或者数据结构) 数据结构-Array [基本类型] 4.一个样例a ...
- 洛谷P4364 [九省联考2018]IIIDX(线段树)
传送门 题解看得……很……迷? 因为取完一个数后,它的子树中只能取权值小于等于它的数.我们先把权值从大到小排序,然后记$a_i$为他左边(包括自己)所有取完他还能取的数的个数.那么当取完一个点$x$的 ...
- 【原创】《从0开始学RocketMQ》—集群搭建
用两台服务器,搭建出一个双master双slave.无单点故障的高可用 RocketMQ 集群.此处假设两台服务器的物理 IP 分别为:192.168.50.1.192.168.50.2. 内容目录 ...