CentOs5.8下安装Oracle12C

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. 创建用户及组

[[email protected] ~]# groupadd oinstall
[[email protected] ~]# groupadd dba
[[email protected] ~]# useradd -g oinstall -G dba oracle
[[email protected] ~]# 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.创建安装目录

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

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身份执行以下脚本:

[[email protected] /]# /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.
[[email protected] /]# /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.验证数据库及监听安装

[[email protected] 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
[[email protected] 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数据库安装成功!

时间: 2024-10-11 13:22:36

CentOs5.8下安装Oracle12C的相关文章

CentOS5.6下安装Oracle10G软件(包含报错经验)

CentOS5.6下安装Oracle10G ******************************************************************************** *目标:在Centos系统下,安装Oracle10g软件 *步骤: *                1.安装包 *                2.域名解析设置及网络配置 *                3.创建用户.组 *                4.配置内核参数.修改环境变量

CentOS5.6下安装Oracle10G软件 【保留报错经验】

CentOS5.6下安装Oracle10G ******************************************************************************** *目标:在Centos系统下,安装Oracle10g软件 *步骤: *                1.安装包 *                2.域名解析设置及网络配置 *                3.创建用户.组 *                4.配置内核參数.改动环境变量

centOs5.10 下安装svn服务器

///////////////////////////===============CentOs5.10 下安装svn服务器================/////////////////////////////////// //一:安装SVN #yum list sub* #yum install subversion //二:查看是否安装成功 #svnserve --version //三:创建svn仓库 #mkdir -p /opt/svn/ # mkdir -p /opt/svn/sv

Windows下安装Oracle12C(二)

一.安装Oracle 参考 Windows下安装Oracle12C(一) 二.新建用户 1. 安装完成后,启动SQLPlus,然后输入内置的用户名和密码 用户名:sys   密码:as sysdba 2. 正常登陆后输入如下代码,注意分号不能缺失(Oracle的SQL也应该如此,否则会报2,其实是提示这是第二行的意思) create user c##lcf identified by 123456; alter user c##lcf account unlock; grant create s

Centos下安装Oracle12c

总结一次安装oracle的折腾血泪史环境准备 centos7 虚拟机VMware Workstation Pro14 IP:192.168.245.128(根据实际情况) 4G物理内存,8G虚拟内存,处理器2 Oracle的安装文件夹不低于15G 为虚拟机分配两个以上的处理器 磁盘SSD 远程登陆:Xshell 软件包:oracle12c  12.2.0.1 数据库下载地址:https://www.oracle.com/technetwork/database/enterprise-editio

centos5.5下安装KVM

动手在linux下面安装KVM,整理了一下具体步骤: 1.查看cpu是否支持虚拟化,执行命令#cat /proc/cpuinfo |grep flags 出现vmx或svm表示cpu支持,其中svm针对AMD平台,vmx针对Intel平台. 2.KVM安装包已经包含在系统盘的安装包里面,直接挂载光盘,设置好yum源为本地光盘 yum --disablerepo=\* --enablerepo=c5-media groupinstall 'KVM' 安装 查看系统是否加载了kvm模块: 方法一:[

Centos5.6下安装Nagios PNP

去官方下载最新的版本nagios-4.0.8  http://www.nagios.org/download/core [[email protected] nagios]#  tar zxvf nagios-4.0.8.tar.gz [[email protected] nagios-4.0.8]# make all [[email protected] nagios-4.0.8]#   make install [[email protected] nagios-4.0.8]#  make

Centos5.5下安装cacti

系统环境OS:CentOSDataBase:MySQL5.0PHP Apachenet-snmp部署CentOS cacti配置需要的环境安装MySQLyum -y install mysqlyum -y install mysql-serveryum -y install mysql-devel安装apacheyum -y install httpd安装phpyum -y install phpyum -y install php-mysql 启动各类服务并且加入启动列表service htt

Centos5下安装tfs并使用nginx做访问

操作系统环境 [[email protected] ~]# uname -aLinux localhost.localdomain 2.6.18-371.9.1.el5 #1 SMP Tue Jun 10 17:49:56 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux[[email protected] ~]# cat /etc/issueCentOS release 5.10 (Final)Kernel \r on an \m [[email protecte