怎样在 Centos 6.3 上安装 Oralce 11g R2 数据库服务器

问题: 怎样安装 欧乐士 11g R2 数据库服务器在 Centos 6.x?

回答:

1-在开始之前,您必须下载一些依赖项

yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

2-调整sysctl.conf

就我而言

[[email protected] ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296

请更改为标准 Oracle 值

net.ipv4.ip_forward = 0
 net.ipv4.conf.default.rp_filter = 1
 net.ipv4.conf.default.accept_source_route = 0
 kernel.sysrq = 0
 kernel.core_uses_pid = 1
 net.ipv4.tcp_syncookies = 1
 net.ipv4.ip_local_port_range = 9000 65500
 fs.file-max = 65536
 kernel.shmall = 10523004
 kernel.shmmax = 6465333657
 kernel.shmmni = 4096
 kernel.sem = 250 32000 100 128
 net.core.rmem_default = 262144
 net.core.wmem_default = 262144
 net.core.rmem_max = 4194304
 net.core.wmem_max = 1048576
 fs.aio-max-nr = 1048576

3-添加用户和组以及权限

# groupadd oinstall
#groupadd  oper
# groupadd dba
#/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle
# passwd oracle
[[email protected] ~]#vi /etc/pam.d/login
# add
session    required     pam_selinux.so open
 session    required     pam_namespace.so
 session    required     pam_limits.so
 session    optional     pam_keyinit.so force revoke
 session    include      system-auth
 -session   optional     pam_ck_connector.so
[[email protected] ~]#vi /etc/security/limits.conf
 # add This  bellow
 oracle   soft   nproc   2047
 oracle   hard   nproc   16384
 oracle   soft   nofile   1024
 oracle   hard   nofile   65536
 [[email protected] ~]#vi /etc/profile
 # add at the last line
 if [ $USER = "oracle" ]; then
 if [ $SHELL = "/bin/ksh" ]; then
 ulimit -p 16384
 ulimit -n 65536
 else
 ulimit -u 16384 -n 65536
 fi
 fi

现在切换到用户 Oracle

 [[email protected] ~]$chmod 755 /app/oracle
[[email protected] ~]$mkdir /app/oracle/app
[[email protected] ~]$chmod 775 /app/oracle/app
[[email protected] ~]$mkdir /app/oracle/oradata
[[email protected] ~]$chmod 775 /app/oracle/oradata
[[email protected] ~]$vi ~/.bash_profile
 # add this to oracle profile
ORACLE_HOME=/app/oracle/11.2.0.2/client
ORACLE_BASE=/app/oracle
TEMP=/app/tmp/ora
TMPDIR=/app/tmp/ora

export ORACLE_HOME
export ORACLE_BASE
export TEMP
export TMPDIR
export PATH

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

现在运行安装程序并享受

怎样在 Centos 6.3 上安装 Oralce 11g R2 数据库服务器 1

怎样在 Centos 6.3 上安装 Oralce 11g R2 数据库服务器 2