联系:手机/微信(+86 17813235971) QQ(107644445)
标题:RedHat 6.1安装Oracle 11.2.0.3
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
一、操作系统版本
[root@xifenfei stage]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)
[root@xifenfei stage]# uname -a
Linux xifenfei 2.6.32-131.0.15.el6.i686 #1 SMP Tue May 10 15:42:28 EDT 2011 i686 i686 i386 GNU/Linux
二、安装数据库版本(安装后之后贴出来的)
[oracle@xifenfei database]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat Nov 5 05:50:34 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – Production
PL/SQL Release 11.2.0.3.0 – Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 – Production
NLSRTL Version 11.2.0.3.0 – Production
三、系统配置
1、检查相应的rpm包的情况(等于或者高于下面版本)
rpm –qa | grep pagename(grep是搜索)
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
numactl-devel-0.9.8.x86_64
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
pdksh-5.2.14-1 –这个包需要下载,安装前需要卸载掉ksh-20100621-6.el6包
rpm –e rpm -e ksh-20100621-6.el6
安装缺少的rpm包
rpm –ivh pagename(根据提示,如果缺少依赖包,也需要加上去)
2、添加组和用户
/usr/sbin/groupadd oinstall(添加oinstall组)
/usr/sbin/groupadd -g 502 dba(添加dba组)
/usr/sbin/useradd -u 502 -g oinstall -G dba oracle(添加用户oracle,主组oinstall,辅助组dba)
passwd oracle(修改oracle用户密码)
3、创建文件夹并修改组和用户所属关系和相关权限
mkdir -p /opt/oracle(创建文件u01/oracle)
chown -R oracle:oinstall /opt/oracle(使得/opt/oracle文件夹输入oracle用户和oinstall组)
chmod -R 775 /opt/oracle(修改u01文件夹访问权限)—可选(最好执行下)
4、添加/etc/hosts中dns解析信息
192.168.1.60 xifenfei
5、在/etc/security/limits.conf中添加用户限制信息
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack 10240
6、修改或者添加/etc/sysctl.conf中信息
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 1048576
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 = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
注意注释掉
# Disable netfilter on bridges.
#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0
—/sbin/sysctl –p(重新加载这些参数,不用重启系统)
7、编辑vi /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
–注意空格,在用户切换时使用su – username,这样才会加载后面的环境变量的配置信息(不要使用su username切换)
8、配置环境变量
在oracle用户下的.bash_profile文件中添加下面信息
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=xff
PATH=$ORACLE_HOME/bin:$PATH
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH NLS_LANG
四、安装过程
1、执行 runInstaller –注意路径,选择只安装数据库软件
2、执行 netca 创建监听
3、执行 dbca 创建数据库