linux上安装Oracle 11g R2 标准版 64位

一.Oracle 安装前的准备

检查一下包,必须全部安装:

binutils-2.20.51.0.2-5.43.el6.x86_64

compat-libstdc++-296-2.96-144.el6.i686

compat-libstdc++-33-3.2.3-69.el6.x86_64

elfutils-libelf-0.161-3.el6.x86_64

elfutils-libelf-devel-0.161-3.el6.x86_64

gcc-4.4.7-16.el6.x86_64

gcc-c++-4.4.7-16.el6.x86_64

glibc-2.12-1.166.el6_7.3.x86_64

glibc-2.12-1.166.el6_7.3.i686

glibc-common-2.12-1.166.el6_7.3.x86_64

glibc-devel-2.12-1.166.el6_7.3.x86_64

glibc-devel-2.12-1.166.el6_7.3.i686

libaio-0.3.107-10.el6.i686

libaio-0.3.107-10.el6.x86_64

libaio-devel-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6.x86_64

libgcc-4.4.7-16.el6.i686

libgcc-4.4.7-16.el6.x86_64

libstdc++-4.4.7-16.el6.x86_64

libstdc++-4.4.7-16.el6.i686

libstdc++-devel-4.4.7-16.el6.x86_64

libstdc++-devel-4.4.7-16.el6.i686

make-3.81-20.el6.x86_64

sysstat-9.0.4-27.el6.x86_64

unixODBC-2.2.14-14.el6.i686

unixODBC-2.2.14-14.el6.x86_64

unixODBC-devel-2.2.14-14.el6.i686

unixODBC-devel-2.2.14-14.el6.x86_64


二.创建oracle用户和组

su - root

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba oracle

echo oracle|passwd --stdin oracle


三.系统参数和配置文件

1.添加如下到文件/etc/sysctl.conf

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 4294967295

kernel.shmall = 268435456

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

fs.file-max = 6815744

fs.aio-max-nr = 1048576

/sbin/sysctl -p


2.添加如下到文件/etc/security/limits.conf

session required /lib64/security/pam_limits.so

session required pam_limits.so

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536


3.添加如下到文件/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


四.修改环境变量

/home/oracle/.bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

export ORACLE_SID=orcl

export ORACLE_BASE=/home/oracle/

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:ORACLE_HOME/lib

export ORACLE_HOME=/home/oracle/product/11.2.0/dbhome_1

export ORACLE_HOME_LISTNER=$ORACLE_HOME

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

umask 022

export PATH

sh /home/oracle/.bash_profile


五.开始安装

进入到oracle的instal文件夹下

./runlnstaller

如果不出意外,会出现oracle的安装图形化界面,

按照提示一步一步安装即可

在安装第二步会oracle会检测环境是否符合,如果提示swap或大,或小,忽略,下一步

完成之后,按照提示用root执行

root.sh和

orainstRoot.sh

回车即可

到此基本就完成了。


六.创建实例

通过图形化来创建实例

cd $home_ORACLE/product/11.2.0/dbhome_1/bin/

./dbca

然后会出现创建实例的图形化界面,按照提示进行下一步就可以了。

本文出自 “IT运维” 博客,转载请与作者联系!

你可能感兴趣的:(oracle)