Install Oracle 12cR2 on RHEL6

目录 ORACLE, 数据库

[TOC]

Install Oracle 12cR2 on RHEL6

操作系统

Red Hat Enterprise Linux Server release 6.5

IP HOSTNAME
192.168.56.10 oel12c

/etc/hosts 文件

 vi /etc/hosts
192.168.56.10   oel12c

/etc/sysctl.conf

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p

/etc/security/limits.conf

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728

依赖包

yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install e2fsprogs -y
yum install e2fsprogs-libs -y
yum install libs -y
yum install libxcb.i686 -y
yum install libxcb -y

关闭防火墙

chkconfig iptables off
service iptables stop

禁用selinux

vi /etc/selinux/config
SELINUX=disabled
setenforce 0 

创建用户组及用户

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle

创建目录

mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

oracle 用户环境配置

vi ~/.bash_profile

# Set Oracle Environment
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1; export ORACLE_HOME
ORACLE_SID=enmo;export ORACLE_SID
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_TERM=vt100;export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
PS1=`hostname`'<$PWD>$';export PS1
EDITOR=/bin/vi; export EDITOR
JAVA_HOME=/usr/local/java;export JAVA_HOME
ORA_NLS33=/u01/product/oracle/ocommon/nls/admin/data;export ORA_NLS33
CLASSPATH=/u01/product/oracle/jdbc/lib/classesl11.zip:/usr/local/java;
PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$ORACLE_HOME/OPatch:$PATH:.;export PATH

软件包准备

Download Software

OTN: Oracle Database 12c Release 2 (12.2.0.1) Software (64-bit).

linuxx6412201database.zip

Unzip the file.

unzip linuxx64_12201_database.zip

图形界面安装oracle 12R2 数据库软件

./runInstaller 启动图形安装界面

配置安全更新

只安装数据库软件

安装单实例数据库软件

root 用户运行脚本

netca 创建监听

dbca 建库

dbca建库完成