码迷,mamicode.com
首页 > 数据库 > 详细

CentOs5.8下安装Oracle12C

时间:2015-02-02 21:23:40      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:

12C安装向导:

http://docs.oracle.com/database/121/LTDQI/toc.htm

12C下载地址:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

 

1.安装Oracle依赖包

使用yum安装Oracle12C依赖,标注32 bit不需安装。没有yum环境的这些包可以在操作系统安装介质中查找。这些需要的安装依赖包可以在Oracle提供的12C在线安装文档中找到。操作系统版本不同,所需要的依赖包略有差别。

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-58
glibc-2.5-58 (32 bit)
glibc-devel-2.5-58
glibc-devel-2.5-58 (32 bit)
ksh
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
libXext-1.0.1
libXext-1.0.1 (32 bit)
libXtst-1.0.1
libXtst-1.0.1 (32 bit)
libX11-1.0.3
libX11-1.0.3 (32 bit)
libXau-1.0.1
libXau-1.0.1 (32 bit)
libXi-1.0.1
libXi-1.0.1 (32 bit) 
make-3.81
sysstat-7.0.2

 

2. 创建用户及组

[root@edu ~]# groupadd oinstall
[root@edu ~]# groupadd dba
[root@edu ~]# useradd -g oinstall -G dba oracle
[root@edu ~]# passwd oracle
Changing password for user oracle.
New UNIX password: 
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.

 

3.修改系统内核参数

使用vi命令修改配置文件/etc/sysctl.conf,使用/sbin/sysctl –p命令使内核配置生效。

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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

 

4.修改用户资源限制

使用vi命令修改配置文件/etc/security/limits.conf

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle stack nproc 16384

 

5.创建安装目录

 

[root@edu ~]# mkdir -p /u01/app
[root@edu ~]# chown -R oracle:oinstall /u01
[root@edu ~]# chmod -R 775 /u01
[root@edu ~]# ls -ld /u01/app/
drwxrwxr-x 2 oracle oinstall 4096 Jan 29 20:54 /u01/app/
[root@edu ~]#

 

 

6.配置Oracle用户环境变量

 

修改Oracle下的.bash_profile文件,不同的shell名称会有区别。source .bash_profile使修改生效。

 

ORACLE_BASE=/u01/app;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1     export ORACLE_HOME
ORACLE_SID=ORCL;export ORACLE_SID
TMP=/tmp;export TMP
TMPDIR=/tmp;export TMPDIR
PATH=$PATH:$ORACLE_HOME/bin;export PATH
DISPLAY=:0.0;export DISPLAY

 

 

7. 解压执行安装Oracle12C软件

技术分享

 

技术分享

 

技术分享

 

技术分享

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

按照提示以root身份执行以下脚本:

[root@edu /]# /u01/oraInventory/orainstRoot.sh 
Changing permissions of /u01/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/oraInventory to oinstall.
The execution of the script is complete.

 

[root@edu /]# /u01/app/product/12.1.0/dbhome_1/root.sh 
Performing root user operation for Oracle 12c 

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/product/12.1.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

技术分享

 

 

 

8.使用dbca创建数据库

 

在Oracle用户下直接执行dbca命令:

技术分享

 

技术分享

 

技术分享

 

技术分享

 

 

技术分享

 

技术分享

 

 

技术分享

 

 

技术分享

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

技术分享

 

 

9.使用netca创建监听

技术分享

 

技术分享

 

技术分享

 

技术分享

 

技术分享

 

技术分享

 

技术分享

 

 

10.验证数据库及监听安装

 

[oracle@edu database]$ sqlplus /as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jan 30 22:46:06 2015

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 banner from v$version;

BANNER
----------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE    12.1.0.1.0    Production
TNS for Linux: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 – Production

 

[oracle@edu database]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 30-JAN-2015 22:47:42

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edu.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                30-JAN-2015 22:40:00
Uptime                    0 days 0 hr. 7 min. 42 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/diag/tnslsnr/edu/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=edu.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=edu.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/admin/ORCL/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully

 

至此我们的Oracle12c数据库安装成功!

 

CentOs5.8下安装Oracle12C

标签:

原文地址:http://www.cnblogs.com/myrunning/p/4268573.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!