Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1149225
  • 博文数量: 231
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 2662
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-03 16:35
个人简介

学无止境

文章分类

全部博文(231)

文章存档

2014年(7)

2013年(103)

2011年(11)

2010年(53)

2009年(57)

分类: Oracle

2009-12-15 17:32:16

内存至少512MB。
swap区,内存2G以内是2倍,2-8G是相同,8G以上为内存的0.75倍。
400MB的/tmp
3.5G磁盘空间。
内核2.6.18-8 以上。

RPMS:
libstdc++-devel-4.1.1-52.el5.x86_64.rpm
kernel-headers-
glibc-headers-2.5-12.x86_64.rpm
glibc-devel-2.5-12.i386.rpm
glibc-devel-2.5-12.x86_64.rpm
libgomp-4.1.1-52.el5.x86_64.rpm
gcc-4.1.1-52.el5.x86_64.rpm
gcc-c++-4.1.1-52.el5.x86_64.rpm
compat-libstdc++-33-3.2.3-61.x86_64.rpm
compat-libstdc++-33-3.2.3-61.i386.rpm
compat-libstdc++-296-2.96-138.i386.rpm
libXp-1.0.0-8.i386.rpm
sysstat-7.0.0-3.el5.x86_64.rpm
如果某些包已经安装了64bit版本,rpm -ivh --force glibc-devel-2.5-12.i386.rpm

内核参数:

vi /etc/sysctl.conf

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 262144 262144 262144

sysctl -p

建用户组和用户:
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle

建目录:
# mkdir -p /u01/oracle
# chown -R oracle:oinstall /u01/oracle

设置limit限制:
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

vi /etc/pam.d/login
session required pam_limits.so

vi /etc/profile
if [ $USER = "oracle" ]; then
  ulimit -u 16384
  ulimit -n 65536
fi

编辑profile文件:
ORACLE_BASE=/u01/oracle
export ORACLE_BASE
ORACLE_HOME=/u01/oracle/ora10g
export ORACLE_HOME
ORACLE_SID=ora10g
export ORACLE_SID
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_LANG
PATH=$ORACLE_HOME/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/bin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/usr/local/lib:/usr/lib
export LD_LIBRARY_PATH
umask 022


安装Oracle软件
$ ./runInstaller -ignoreSysPrereqs

建库:
使用裸设备建库:
建立lv,为建库准备裸设备。
lvcreate -n system01 -L 500 VolGroup01
lvcreate -n sysaux01 -L 500 VolGroup01
lvcreate -n undotbs01 -L 500 VolGroup01
lvcreate -n temp01 -L 250 VolGroup01
lvcreate -n users01 -L 120 VolGroup01
lvcreate -n redo1_1 -L 120 VolGroup01
lvcreate -n redo1_2 -L 120 VolGroup01
lvcreate -n redo1_3 -L 120 VolGroup01
lvcreate -n control1 -L 110 VolGroup01
lvcreate -n control2 -L 110 VolGroup01
lvcreate -n control3 -L 110 VolGroup01
lvcreate -n spfile -L 5 VolGroup01
lvcreate -n pwdfile -L 5 VolGroup01

修改裸设备绑定文件。
vi /etc/sysconfig/rawdevices

/dev/raw/raw1   /dev/VolGroup01/system01
/dev/raw/raw2   /dev/VolGroup01/sysaux01
/dev/raw/raw3   /dev/VolGroup01/users01
/dev/raw/raw4   /dev/VolGroup01/temp01
/dev/raw/raw5   /dev/VolGroup01/undotbs01
/dev/raw/raw6   /dev/VolGroup01/redo1_1
/dev/raw/raw7   /dev/VolGroup01/redo1_2
/dev/raw/raw8   /dev/VolGroup01/redo1_3
/dev/raw/raw9   /dev/VolGroup01/control1
/dev/raw/raw10  /dev/VolGroup01/control2
/dev/raw/raw11  /dev/VolGroup01/control3
/dev/raw/raw12  /dev/VolGroup01/spfile
/dev/raw/raw13  /dev/VolGroup01/pwdfile
重启裸设备服务:
service rawdevices restart
修改权限:
chown oracle:oinstall /dev/raw/*
chmod 660 /dev/raw/*
修改文件,使裸设备重启后生效:
vi /etc/udev/rules.d/60-raw.rules

ACTION=="add", KERNEL=="raw[1-9]*", OWNER="oracle", GROUP="oinstall", MODE="0660"

建立裸设备映射文件:
vi ora10g_raw.conf

system=/dev/raw/raw1
sysaux=/dev/raw/raw2
users=/dev/raw/raw3
temp=/dev/raw/raw4
undotbs1=/dev/raw/raw5
redo1_1=/dev/raw/raw6
redo1_2=/dev/raw/raw7
redo1_3=/dev/raw/raw8
control1=/dev/raw/raw9
control2=/dev/raw/raw10
control3=/dev/raw/raw11
spfile=/dev/raw/raw12
pwdfile=/dev/raw/raw13

在oracle的.bash_profile中增加:
DBCA_RAW_CONFIG=/home/oracle/ora10g_raw.conf
export DBCA_RAW_CONFIG

用dbca建库。
建库时遭遇错误:
Error received when creating the controlfile on raw devices:
ORA-00202: control file: '/dev/oradata/prd/ebs01/cntrl01.dbf'
ORA-27094: raw volume used can damage partition table
Additional information: -2
Additional information: 536870912
ORA-205 signalled during: alter database mount...
该错误由于BUG引起的
Bug 3653088 Abstract: ORA-1501 ORA-27094 CREATING SINGLE INSTANCE DATABASE ON RAW DEVICES
which was found to be a duplicate of unpublished
Bug: 3628715 Abstract: CHANGES TO SKGFR.C TO SUPPORT LVMS ON LINUX
解决方法是安装patch 3628715,由于该补丁属于测试补丁,需要建立SR才能下载,所以建议直接升级到10.2.0.4后再建库。

 

阅读(1920) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~