Oracle 11g 在RedHat Linux 5.8(3)

首先必须建立一个组 oinstall

针对数据库软件 dba oper 拥有者Oracle 必须加入asmdba

针对grid软件 asmdba asmadmin asmoper 拥有者grid

判断用户是否存在

# id oracle

# id grid

如果已经建立,userdel 删除,并删除其家目录

如果没有新建

[root@oracle /]# passwd oracle

检查配置

配置资源限制

vim /etc/security/limits.conf

加入

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

grid soft stack 10240

vim /etc/sysctl.conf

加入:

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 4294967295

kernel.shmmni = 4096

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 = 1048576

然后/sbin/sysctl -p

建立软件需要目录

检查

配置用户环境

对于oracle用户

cd /home/oracle

vim .bash_profile

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export ORACLE_SID=orcl

生效

source .bash_profile

对于grid用户

cd /home/grid

vim .bash_profile

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid

export ORACLE_SID=+ASM

生效

source .bash_profile

ASM存储

冗余级别

?External redundancy asm磁盘组不做冗余 接触外部系统的冗余(建议底层是raid)

?Normal redundancy 2路镜像

?High redundancy 3路镜像

注意:生产环境一般用External redundancy asm磁盘组本身不做冗余,存储raid做冗余

实现:

+data 3路镜像

+fra 2路镜像

至少需要5块磁盘

关机:添加5块硬盘

chkconfig sendmail off

不需要启动,加快开机速度

添加5块20G大小硬盘

clip_image080

然后开机

用Root 登陆

先查看硬盘fdisk -l 是否为5块硬盘

然后分区

fdisk /dev/sdb

n

p

1

回车

回车

w

fdisk /dev/sdc

n

p

1

回车

回车

w

fdisk /dev/sdd

n

p

1

回车

回车

w

fdisk /dev/sde

n

p

1

回车

回车

w

fdisk /dev/sdf

n

p

1

回车

回车

w

生效:partprobe

fdisk -l

查看硬盘是不是都分好区

安装asmlib 然后生成asm磁盘

根据你的内核去下载相应的版本软件

oracleasm-support-2.1.8-1.el5.x86_64.rpm

oracleasmlib-2.0.4-1.el5.x86_64.rpm

根据内核

2.6.18-308.el5 x86_64

oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm

上传到服务器

使用 FileZilla将下载好的包上传到服务器

上传到/tmp目录 最好上传前将/tmp清空

rm -rf *

clip_image082

查看

因为只有我需要的这3个包

所以 rpm -ivh *

授权

clip_image088

检查

clip_image090

生成ASM磁盘

检查

5个ASM磁盘

上传grid的软件

新建安装目录

上传grid的软件 工具(FileZilla)

clip_image098

开始安装,使用grid 用户

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/0c491940a311f579a26e18129827a27a.html