oracle 11g 在linux radhat6.2安装

来源:互联网 发布:服务器开发java哪部分 编辑:程序博客网 时间:2024/05/22 00:18

 

 

11g oracle database installation withoracle grid infrastructure on linux

 

 

一、预装oracle database准备

 

补丁检测

for i in binutils compat-gcc-34compat-libstdc++-296 control-center \

     gcc gcc-c++ glibc glibc-common glibc-devel libaio libgcc \

     libstdc++ libstdc++-devel libXp make openmotif22 setarch

do

rpm -q $i &>/dev/null || F="$F$i"

done ;echo $F;unset F

 

 

安装11g oracle database所需的linux软件包

 

安装命令执行

 

yum install binutils compat-libstdc++elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibcglibc-common glibc-develglibc-headers ksh-20060214 libaio libaio-devel libgcc libstdc++-libstdc++-devel make-3.81 sysstat unixODBC unixODBC-devel

 

 

建立oracle产品组,root用户

vi /etc/oraInst.loc

inventory_loc=/u01/app/oraInventory

inst_group=oinstall

 

DNS解析,直接配置hosts文件

vi /etc/hosts

10.124.88.38 Imagetest2 

查看当前swap

grep SwapTotal /proc/meminfo

 

注:在线增加swap,请看附表增加swap

查看当前shmfs

df -h /dev/shm

注:oracle 11g AMM使用内存需要通过更多的共享内存

(如需增加/dev/shm请看附表增加/dev/shm

 

 

建立组

 

/usr/sbin/groupadd -g 509 oinstall

/usr/sbin/groupadd -g 502 dba

/usr/sbin/groupadd -g 503 oper

/usr/sbin/groupadd -g 504 asmadmin

/usr/sbin/groupadd -g 505 asmoper

/usr/sbin/groupadd -g 506 asmdba

 

建立用户

/usr/sbin/useradd -u 510 -g oinstall -Gdba,oper,asmdba oracle

 

修改密码

passwd oracle

 

注:具体组和用户含义请看附表Overview of Groups and Users

用户环境变量

 

--oracle---

 

vi .bash_profile

export ORACLE_SID=doudou

export ORACLE_BASE=/u01/app/oracle

exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export TMP=/tmp

export TMPDIR=/u01/tmp

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:

umask 022

 

注:tmp空间不足时,添加TMPDIR;可以看附表增大tmp

 

建立目录

--oracle database--

mkdir -p /u01/app/oracle

mkdir -p /u01/app/oraInventory

chown -R oracle:oinstall /u01/app/oracle

chown oracle:oinstall /u01/app/oraInventory

 

 

安装用户资源限制

vi /etc/security/limits.conf

oracle             soft    nproc  2047

oracle             hard    nproc  16384

oracle             soft    nofile 1024

oracle             hard    nofile 65536

oracle             soft    stack  10240

 

 

对默认的shell启动文件进行更改,以便oracle安装所有者的 ulimit设置

 

vi /etc/profile

 

if [ /$USER = "oracle" ] || [/$USER = "grid" ]; then

   if [ /$SHELL = "/bin/ksh" ]; then

       ulimit -p 16384

       ulimit -n 65536

   else

       ulimit -u 16384 -n 65536

   fi

   umask 022

fi

 

更改内核参数值  直接复制到最底端即可

vi /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 8388608

kernel.shmmax = 17179869184

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

 

################

kernel.shmall = 524288

kernel.shmmax = 1073741824

################

 

 

 

执行sysctl -p立即生效

 

注: shmall and shmmax解释请看附表 shmall and shmmax

 

shmallphysicalmemory/PAGESIZE

shmmaxRecommended: Morethan half the physical memory

getconf PAGESIZE

 

 

解压

 

 

 

二、图形安装过程

安装oracle database

[root@doudou-32bit ~]# su - oracle

[oracle@doudou-32bit ~]$ exportDISPLAY=192.168.1.25:0.0(远程端主机ip

[oracle@doudou-32bit database]$./runInstaller

[oracle@doudou-32bit database ] dbca

0 0
原创粉丝点击