Installing Oracle Database 12.1 on OEL6 64-bit

本周12C终于如愿以偿的发布了,那么作为Oracle的忠实Fans,必须得下一个来试试啊。顺便把操作系统也换成了OEL 6。其实在发布之前我也已经玩过测试版了。安装起来和11g差不多的。这里我就不继续啰嗦。我的安装指导性文档来源于MOS。Requirements for Installing Oracle Database 12.1 on RHEL6 or OL6 64-bit (x86-64) [ID 1529864.1]。下面我们来揭开12C的面纱。
1.操作系统需求
Oracle Linux 5 Update 6或者更高以上版本。
Red Hat Enterprise Linux 5 Update 6或者更高以上版本。
Oracle Linux 6
Red Hat Enterprise Linux 6

2.安装默认的软件包
Oracle推荐在安装操作系统的时候,选择安装默认的软件包。这里可以参考文档:Note 376183.1

Base System > Base
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Applications > Internet Browser
Development > Additional Development
Development > Development Tools

3.Linux内核需求
Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39-200.24.1.el6uek.x86_64 or later
Oracle Linux 6 with the Red Hat Compatible kernel: 2.6.32-71.el6.x86_64 or later
Red Hat Enterprise Linux 6: 2.6.32-71.el6.x86_64 or later
Red Hat Enterprise Linux 6 with the Unbreakable Enterprise Kernel: 2.6.32-100.28.5.el6.x86_64 or later

4.安装软件包需求

binutils-2.20.51.0.2-5.11.el6 (x86_64)
glibc-2.12-1.7.el6 (x86_64)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libaio-0.3.107-10.el6 (x86_64)
libXext-1.1 (x86_64)
libXtst-1.0.99.2 (x86_64)
libX11-1.3 (x86_64)
libXau-1.0.5 (x86_64)
libxcb-1.5 (x86_64)
libXi-1.3 (x86_64)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
ksh? <== any version of ksh is acceptable
libstdc++-devel-4.4.4-13.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (x86_64)

5.内核参数设置

kernel.shmall=393216
kernel.shmmax=1610612736
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1/2 of physical memory in pages,
kernel.shmmax = 1/2 of physical memory in bytes.
这两个值和物理内存有关系,我的虚拟机设置的3G内存。那么这儿就应该设置kernel.shmmax=1610612736,然后用这个值除以页面值,默认页面是4096。所以kernel.shmall=393216。
6.设置Shell Limits

oracle              soft    nproc    2047 
oracle              hard   nproc   16384 
oracle              soft    nofile    1024 
oracle              hard   nofile    65536 
oracle              soft    stack    10240 
oracle              hard   stack    10240

在/etc/security/limits.conf下面设置Shell Limits配置。
7.关闭selinux,修改/etc/selinux/config文件

SELINUX=disabled

8.关闭防火墙

service iptables stop
chkconfig iptables off

9.设置主机名,修改/etc/hosts文件
192.168.56.194? db12c.localdomain db12c

10.创建用户

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

由于有些功能我不需要使用,我只是基本安装,所以这儿我就只创建了默认的用户。如果有特殊需求,可以建立特殊的用户,比如backupdba、dgdba、kmdba、asmdba、asmoper、asmadmin。
11.建立文件夹

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

12.设置Oracle环境变量

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR 

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOME
ORACLE_SID=DB12C; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

13.上传介质,安装数据库
./runInstaller
安装截图如下:
image
image
image
image
image
image
image
image
image
image
image
image
安装完成之后,先netca创建监听,然后dbca开始建库
image
image
image
image
有变化的地方在这儿。多了创建CDB和PDB的选项。这里我创建了一个CBD和三个PDB。
image
全新的EM Express值得尝试
image
image
image
image
image
image
image
image
安装完了之后,我们可以通过最新的EM Express 12C来查看我们的数据库状态。

[oracle@db12c bin]$ sqlplus / as sysdba 

SQL*Plus: Release 12.1.0.1.0 Production on Sat Jun 29 16:25:53 2013 

Copyright (c) 1982, 2013, Oracle.  All rights reserved. 

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options 

SQL> select dbms_xdb_config.gethttpsport() from dual; 

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5500

接下来通过

https://192.168.56.194:5500/em来访问

参考文档:
Requirements for Installing Oracle Database 12.1 on RHEL6 or OL6 64-bit (x86-64) [ID 1529864.1]
Oracle? Database 2 Day DBA 12c Release 1 (12.1)? —
Starting EM Express

分享到: 更多

Post a Comment

Your email is never published nor shared. Required fields are marked *