linux 6.4 平台下 Oracle 12c 单实例 安装手册

一.准备工作

1.1 安装需要的RPM 包

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  <== 任何版本的 ksh 都可以。

libstdc++-devel-4.4.4-13.el6 (x86_64)

libaio-devel-0.3.107-10.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (i686)

glibc-2.12-1.7.el6 (i686)

glibc-devel-2.12-1.7.el6 (i686)

libgcc-4.4.4-13.el6 (i686)

libstdc++-4.4.4-13.el6 (i686)

libstdc++-devel-4.4.4-13.el6 (i686)

libaio-0.3.107-10.el6 (i686)

libaio-devel-0.3.107-10.el6 (i686)

libXext-1.1 (i686)

libXtst-1.0.99.2 (i686)

libX11-1.3 (i686)

libXau-1.0.5 (i686)

libxcb-1.5 (i686)

libXi-1.3 (i686)

这里建议配置好YUM,用yum 来一次安装。

1.2 修改内核参数/etc/sysctl.conf

在sysctl.conf 中加入以下内容:

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.panic_on_oops = 30

如下2个参数直接使用默认值即可:

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

用root用户执行sysctl -p 使修改生效。

1.3 设置 Oracle 用户的Shell 限制

在 /etc/security/limits.conf中添加如下内容:

oracle  soft    nproc   2047

oracle  hard   nproc  16384

oracle  soft    nofile   1024

oracle  hard   nofile   65536

oracle  soft    stack   10240

oracle  hard   stack   10240

注:limits.conf 文件发生更改时,这些更改立即生效。但是,如果 Oracle 用户已登录,则这些更改将在注销这些用户并重新登录之后生效。必须先完成此操作,然后再使用这些帐户进行安装。

1.4 设置PAM

确保加载了最新版本的 PAM,然后在 /etc/pam.d/login 文件中添加或编辑以下行:

session required pam_limits.so

1.5 设置ulimit

验证当前 ulimit,如果需要则增大。可以采用多种方式完成此操作,推荐方法是在 /etc/profile 中添加以下行:

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384 
       ulimit -n 65536
    else
       ulimit -u 16384 -n 65536
    fi
fi

1.6 创建Oracle用户和组

groupadd oinstall

groupadd dba

groupadd oper

useradd -g oinstall -G dba oracle

passwd oracle

1.7 创建目录

mkdir -p /u01/app/oracle/product/12.1.0/db_1 
chown -R oracle.oinstall /u01 
chmod -R 777 /u01

1.8 设置oracle用户的环境变量

修改/home/oracle/.bash_profile 文件添加如下内容:

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=dave; export ORACLE_SID

SHLIB_PATH=$LD_LIBRARY_PATH;export SHLIB_PATH
NLS_LANG=American_America.zhs16gbk;export NLS_LANG
ORA_NLS10=$ORACLE_HOME/nls/data;export ORA_NLS10

TNS_ADMIN=$ORACLE_HOME/network/admin;export TNS_ADMIN

ORACLE_TERM=xterm; export ORACLE_TERM

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/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;export CLASSPATH

Source 参数使生效:

[[email protected] ~]$ source ~/.bash_profile

二.开始安装

运行runinstaller。

[[email protected] database]#/u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory tooinstall.

The execution of the script is complete.

[[email protected] database]#/u01/app/oracle/product/12.1.0/db_1/root.sh

Performing root user operation for Oracle 12c

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /u01/app/oracle/product/12.1.0/db_1

Enter the full pathname of the local bin directory:[/usr/local/bin]:

Copyingdbhome to /usr/local/bin ...

Copyingoraenv to /usr/local/bin ...

Copyingcoraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file asneeded by

Database Configuration Assistant when a database iscreated

Finished running generic part of root script.

Now product-specific root actions will beperformed.

[[email protected] database]#

三. 查询数据库信息

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Thu Apr24 12:00:39 2014

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

Connected to:

Oracle Database 12c Enterprise Edition Release12.1.0.1.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics andReal Application Testing options

SQL> set lin 140

SQL> select * from v$version;

BANNER                                                                              CON_ID

------------------------------------------------------------------------------------------

OracleDatabase 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0

PL/SQLRelease 12.1.0.1.0 - Production                                                    0

CORE    12.1.0.1.0      Production                                                       0

TNSfor Linux: Version 12.1.0.1.0 - Production                                            0

NLSRTLVersion 12.1.0.1.0 - Production                                                    0

SQL> SELECT CDB FROM V$DATABASE;

CDB

---

YES

SQL> select PDB_NAME,CON_UID,pdb_id,status fromdba_pdbs;

PDB_NAME                CON_UID     PDB_ID STATUS

-------------------- ---------- -----------------------

PDBCNDBA              426143573          3 NORMAL

PDB$SEED            4088301206          2 NORMAL

SQL> select con_id,dbid,NAME,OPEN_MODE fromv$pdbs;

CON_ID       DBID NAME                           OPEN_MODE

---------- ---------- ----------------------------------------

24088301206 PDB$SEED                      READ ONLY

3  426143573 PDBCNDBA                       READ WRITE

SQL> show con_name

CON_NAME

------------------------------

CDB$ROOT

SQL> alter session set container=pdbcndba;

Session altered.

SQL> show con_name

CON_NAME

------------------------------

PDBCNDBA

SQL> show con_name

CON_NAME

------------------------------

PDBCNDBA

SQL> create table cndba as select * fromall_users;

Table created.

SQL> alter session set container=CDB$ROOT;

Session altered.

SQL> select count(1) from cndba;

select count(1) from cndba

*

ERROR at line 1:

ORA-00942: table or view does not exist

--------------------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

About  Dave:

--------------------------------------------------------------------------------------------

QQ:      251097186

Email:    [email protected]

Blog:     http://blog.csdn.net/tianlesoftware

Weibo:    http://weibo.com/tianlesoftware

Twitter:  http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

Linkedin: http://cn.linkedin.com/in/tianlesoftware

Dave 的QQ群:

--------------------------------------------------------------------------------------------

注意:加群必须注明表空间和数据文件关系 | 不要重复加群

CNDBA_1: 104207940 (满)    CNDBA_2: 62697716 (满)   CNDBA_3: 283816689

CNDBA_4: 391125754   CNDBA_5: 62697850    CNDBA_6: 62697977   CNDBA_7: 142216823(满)

时间: 2024-11-05 21:43:09

linux 6.4 平台下 Oracle 12c 单实例 安装手册的相关文章

Linux平台oracle 11g单实例 安装部署配置 快速参考

1.重建主机的Oracle用户 组 统一规范 uid gid 以保证共享存储挂接或其他需求的权限规范 userdel -r oracle groupadd -g 500 oinstall groupadd -g 501 dba useradd -g oinstall -G dba -u 500 oracle #id oracle uid=500(oracle) gid=500(oinstall) 组=500(oinstall),501(dba) 2.安装好Oracle 需要的rpm包.安装rpm

Redhat下Oracle 12c单节点安装

操作系统:Redhat6.7 64位[[email protected] ~]# more /etc/redhat-release Red Hat Enterprise Linux Server release 6.7 (Santiago) (1)配置/etc/hosts文件[[email protected] ~]# hostnameOracle12CDB[[email protected] ~]# vim /etc/hosts127.0.0.1   localhost localhost.l

Oracle 11G单实例安装

最近因为工作原因需要使用到Oracle数据库,所以必须要使用Oracle的数据库,刚好需要安装Oracle数据库在此就简单的做一下整理.Oracle的安装无论是在Windows下还是在Unix系统下都建议使用图形界面安装,这样可以具体的看到报错信息,在Windows上安装没有什么难度,安装的资料也有很多,此处就以Linux环境来说说Oracle的安装.当然在Linux上安装Oracle建议使用VNC安装以免带来不必要的问题.Oracle的安装部署配置比较复杂,大致可以分为三个部分:一.软件安装:

oracle 12c单实例数据库打12.1.0.2.4补丁记录

操作系统版本: [[email protected] OPatch]$ lsb_release -a LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: Enterpr

Windows平台下Oracle监听服务启动过程中日志输出

Windows平台下Oracle监听服务启动过程中日志输出记录. 日志目录:D:\app\Administrator\diag\tnslsnr\WIN-RU03CB21QGA\listener\trace\listener.log 日志输出内容: Sat Aug 06 20:38:44 2016 系统参数文件为D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora 写入d:\app\administrator

Windows平台下Oracle实例启动过程中日志输出

Windows平台下Oracle实例启动过程中日志输出记录. 路径:D:\app\Administrator\diag\rdbms\orcl\orcl\trace\alert_orcl.log 输出内容: Sat Aug 06 20:39:55 2016 Starting ORACLE instance (normal) LICENSE_MAX_SESSION = 0 LICENSE_SESSIONS_WARNING = 0 Picked latch-free SCN scheme 3 Usin

VM虚拟机下在LINUX上安装ORACLE 11G单实例数据库

VM虚拟机下在LINUX上安装ORACLE 11G单实例数据库 1.环境及安装前规划:虚拟机及OS如下 环境:VMware Wordstation ACE版 6.0.2 操作系统:OracleLinux-R5-U8-Server-i386-dvd    3.2G 安装操作系统,这里需要注意的是磁盘空间要预留足够. 我的规划是: 虚拟机分配1024M内存,当然如果主机内存足够,安装时内存设置2048M可以更快. 虚拟机分配一块磁盘,30G磁盘空间. /boot 100M ext3 /    20G

Oracle 11.2.4.0 ACTIVE DATAGUARD 单实例安装(COPY创建备库)

Oracle 11.2.4.0 ADG 单实例安装(COPY创建备库) 规划: 主: OS: Linux Centos 6.5 X64 hostname:ORA11G-DG1 ipaddress:192.168.213.199 db_unique_name=netdata_pd db_name=netdata 备: OS: Linux Centos 6.5 X64 hostname:ORA11G-DG2 ipaddress:192.168.213.200 db_unique_name=netda

[oracle部署实施] 基于centos7静默安装oracle 11gr2单实例数据库

基于centos7静默安装oracle 11gr2单实例数据库 1.vmware最小化安装centos7 分配20G硬盘+2G内存+nat网络 400mboot+4Gswap 去除kdump 最小化安装 并配置网络cat /etc/sysconfig/network-scripts/ifcfg-ens32BOOTPROTO="static"DEVICE="ens32"ONBOOT="yes"IPADDR=192.168.188.11NETMASK