Install Grid Infrastructure and Oracle Database SW for Standalone

1 Prerequisites

(1)  内存检查

如果需要同时安装Grid Infrastrue及Database则内需要至少4G

[oracle@sdb1 ~]$ free -m

             total       used      free     shared    buffers    cached

Mem:        2002       1354        648          0        189        595

-/+ buffers/cache:        569       1433

Swap:         2047          0       2047

依照以下表格建立swap

RAM

Swap Space

Between 1.5 GB and 2 GB

1.5 times the size of the RAM

Between 2 GB and 16 GB

Equal to the size of the RAM

More than 16 GB

16 GB

(2)  检查安装区间及/tmp空间

如下,软件计划安装在/u01上

软件安装路径至少需要5.5G,/tmp至少需要1G

[root@sdb1 u01]# df -h

Filesystem           Size  Used Avail Use% Mounted on

/dev/sda3              18G  2.6G  14G  16% /

/dev/sda1              99M   22M  72M  24% /boot

tmpfs               1002M     0 1002M   0% /dev/shm

/dev/sdb1              16G  4.8G  11G  32% /u01

[root@sdb1 u01]# df -h /tmp

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3              18G  2.6G   14G  16% /

(3)  创建用户及群组

groupadd -g 5000 asmadmin

groupadd -g 5001 asmdba

groupadd -g 5002 asmoper  

groupadd -g 6000 oinstall

groupadd -g 6001 dba

groupadd -g 6002 oper

useradd  -g oinstall -G asmadmin,asmdba,asmoper,dba grid --对于standalone实例安装oracle Restart需要grid账号属于dba群组

#passwd grid

useradd  -g oinstall -G dba,asmdba,oper oracle

# passwd oracle

(4)  安装相关RPM、Oracle Validated包设定kernel及resource limit

将Oracle Enterprise Linux5.8的镜像文件mount至系统文件夹/tmp/mnt/

设定YUM:

[root@sdb1 yum.repos.d]# cat/etc/yum.repos.d/public-yum-oel5u8.repo

[oel5u8]

name=Oracle Enterprise Linux 5.8

baseurl=file:///tmp/mnt/Server      --该路径是RPM包的存放地点

gpgcheck=0

enable=1

 

下载oracle-validated包oracle-validated-1.1.0-7.el5.x86_64 .rpm放置在/tmp文件夹下。使用yum安装

[root@sdb1 tmp]# yum install oracle-validated

安装后,会修改kernel parameter及oracle用户的

resource limit(/etc/security/limits.conf)。依照用户oracle的resource限制修改来修改grid限制:

# Oracle-Validated setting for nofile soft limit is131072

grid  soft   nofile    131072

 

# Oracle-Validated setting for nofile hard limit is131072

grid  hard   nofile    131072

 

# Oracle-Validated setting for nproc soft limit is131072

grid  soft   nproc    131072

 

# Oracle-Validated setting for nproc hard limit is131072

grid  hard   nproc    131072

 

# Oracle-Validated setting for core soft limit isunlimited

grid  soft   core    unlimited

 

# Oracle-Validated setting for core hard limit isunlimited

grid  hard   core    unlimited

 

# Oracle-Validated setting for memlock soft limitis 50000000

grid  soft   memlock    50000000

 

# Oracle-Validated setting for memlock hard limitis 50000000

grid  hard   memlock    50000000

(5)  创建文件夹

Oracle及grid两个帐号应该要不同的oracle base。所以要建立连个不同的文件夹。在/u01下面建立文件夹,权限如下

[oracle@sdb1 u01]$ ls -l

total 32

drwxr-xr-x 2 grid  oinstall  4096 May 26 15:41 grid

drwx------ 2 root  root     16384 May 26 15:37lost+found

drwxr-xr-x 2 oracle oinstall  4096 May 26 15:43 oracle

(6)  安装cvuqdisk-1.0.9-1.rpm

解压缩p13390677_112040_Linux-x86-64_3of7.zip至/tmp/mnt/。在/tmp/mnt/grid/rpm下找到安装包,以root身份安装。

[root@sdb1 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm

Preparing...                                                           ########################################### [100%]

   1:cvuqdisk                                                           ###########################################[100%]

(7)  设定grid用户的环境变量

vi .bash_profile,增加以下语句

umask 022

(8)  使用udev创建ASM DISK

在/etc/udev/rules.d/99-oracle-asmdisk.rules,编辑如下规则

KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="36006016031c02d00e0b01609e7fee411",NAME="asm-diskc", OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="36006016031c02d002ea74121e7fee411", NAME="asm-diskd",OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="36006016031c02d0012c1bc2ae7fee411",NAME="asm-diske", OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="36006016031c02d00e018a012e7fee411",NAME="asm-diskf", OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="36006016031c02d0040dfda33e7fee411", NAME="asm-diskg",OWNER="grid", GROUP="asmadmin", MODE="0660"

 

 

重启udev:

[root@sdb1~]# start_udev

Startingudev: [  OK  ]

2安装Grid软件

解压缩p13390677_112040_Linux-x86-64_3of7.zip

执行gird/runInstaller



注意:grid infrasture的oracle base要和oraclehome(software location)在不同的目录。

 

 

按照指示使用root权限执行脚本:

3 配置OracleRestart

以root身份执行以下脚本:

[root@sdb1 ~]#/u01/grid/app/11.2.0/grid/perl/bin/perl -I /u01/grid/app/11.2.0/grid/perl/lib-I /u01/grid/app/11.2.0/grid/crs/install/u01/grid/app/11.2.0/grid/crs/install/roothas.pl

Using configuration parameter file:/u01/grid/app/11.2.0/grid/crs/install/crsconfig_params

User ignored Prerequisites during installation

LOCAL ADD MODE

Creating OCR keys for user 'grid', privgrp'oinstall'..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp'root'..

Operation successful.

CRS-4664: Node sdb1 successfully pinned.

Adding Clusterware entries to inittab

 

sdb1    2016/05/30 14:18:40    /u01/grid/app/11.2.0/grid/cdata/sdb1/backup_20160530_141840.olr

Successfully configured Oracle GridInfrastructure for a Standalone Server

 

[grid@sdb1 ~]$ $ORACLE_HOME/oui/bin/runInstaller-updateNodeList ORACLE_HOME=/u01/grid/app/11.2.0/grid -defaultHomeName

Starting Oracle Universal Installer...

 

Checking swap space: must be greater than 500MB.   Actual 2047 MB    Passed

The inventory pointer is located at/etc/oraInst.loc

The inventory is located at/u01/grid/app/oraInventory

'UpdateNodeList' was successful.

 

完成后使用以下命令查看Oracle Restart状态

[grid@sdb1 ohasd]$ crsctl config has

CRS-4622: Oracle High Availability Services autostartis enabled.

[grid@sdb1 ohasd]$ crsctl check has

CRS-4638: Oracle High Availability Services isonline

 

3 取消OracleRestart配置

如果在安装时遇到问题,可以deconfig OracleRestart

 

以root身份执行:

# $ORACLE_HOME/crs/install/roothas.pl -deconfig-force

 

Oracle Restart日志文件位置:

$ORACLE_HOME/log/hostname/ohasd

 

4 在gird用户下使用netca和asmca创建listener及asm group

 

5 安装OracleDatabase Software

unzip p13390677_112040_Linux-x86-64_1of7.zip  -d mnt/

unzip p13390677_112040_Linux-x86-64_2of7.zip  -d mnt/

cd database

./runInstaller

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值