1.系统版本
[root@BX home]# uname -r
2.6.32-431.el6.x86_64
[root@BX home]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
2.创建/U01目录
[root@BX home]# umount /home
[root@BX home]# mkfs.ext3 /dev/sda8 -L /U01
[root@BX home]# mkdir -p /U01/app/oracle
[root@BX home]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 6.0G 3.1G 2.6G 56% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 124M 57M 62M 49% /boot
/dev/sda2 6.0G 1.7G 4.0G 30% /usr
/dev/sda3 4.0G 199M 3.6G 6% /var
/dev/sda8 237G 188M 225G 1% /U01
4.Creating user
[root@BX home]# groupadd oinstall
[root@BX home]# groupadd dba
[root@BX home]# useradd -g oinstall -G dba oracle
[root@BX home]# chown -R oracle:oinstall /U01/
[root@BX home]# chmod -R 775 /U01/
5.Configuring Kernel Parameters for Linux
[root@BX home]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 34359738368
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
[root@BX home]# sysctl -p
6.Checking Resource Limits for the Oracle Software Installation Users
[root@BX home]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft stack 65536
7.dir and bash
[root@
BX U01]# su - oracle
[oracle@
BX ~]$ vi .bash_profile
export ORACLE_BASE=/U01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12c/db_1
export ORACLE_SID=bmdb
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
export LANG="en_US.UTF-8"
export NLS_LANG=american_AMERICA.UTF8
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
stty erase ^H
8.使用oracle-rdbms-server-12cR1-preinstall安装RPM
[root@BX home]# cd /etc/yum.repos.d/
[root@BX yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2015-09-11 16:08:05-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 184.50.87.64, 184.50.87.48
Connecting to public-yum.oracle.com|184.50.87.64|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5284 (5.2K) [text/plain]
Saving to: "public-yum-ol6.repo"
100%[==================================================================================================>] 5,284 --.-K/s in 0s
2015-09-11 16:08:05 (314 MB/s) - "public-yum-ol6.repo" saved [5284/5284]
[root@BX yum.repos.d]# yum install oracle-rdbms-server-12cR1-preinstall
Loaded plugins: fastestmirror, security
Determining fastest mirrors
* base: mirrors.sina.cn
* extras: mirrors.btte.net
* updates: mirrors.btte.net
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:08
extras | 3.4 kB 00:00
extras/primary_db | 27 kB 00:00
ol6_UEK_latest | 1.2 kB 00:00
ol6_UEK_latest/primary | 23 MB 00:01
ol6_UEK_latest 491/491
ol6_latest | 1.4 kB 00:00
http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/repodata/primary.xml.gz: [Errno 12] Timeout on http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/repodata/primary.xml.gz: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Trying other mirror.
ol6_latest/primary | 52 MB 00:03
ol6_latest 32176/32176
updates | 3.4 kB 00:00
updates/primary_db | 1.3 MB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-14.el6 will be installed
--> Processing Dependency: xorg-x11-utils for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: kernel-uek for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Running transaction check
---> Package kernel-uek.x86_64 0:2.6.39-400.264.1.el6uek will be installed
--> Processing Dependency: kernel-uek-firmware = 2.6.39-400.264.1.el6uek for package: kernel-uek-2.6.39-400.264.1.el6uek.x86_64
---> Package ksh.x86_64 0:20120801-28.el6.1 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package xorg-x11-utils.x86_64 0:7.5-6.el6 will be installed
--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.5-6.el6.x86_64
--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.5-6.el6.x86_64
--> Processing Dependency: libXv.so.1()(64bit) for package: xorg-x11-utils-7.5-6.el6.x86_64
--> Running transaction check
---> Package kernel-uek-firmware.noarch 0:2.6.39-400.264.1.el6uek will be installed
---> Package libXv.x86_64 0:1.0.9-2.1.el6 will be installed
--> Processing Dependency: libX11 >= 1.5.99.902 for package: libXv-1.0.9-2.1.el6.x86_64
---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el6 will be installed
---> Package libdmx.x86_64 0:1.1.3-3.el6 will be installed
--> Running transaction check
---> Package libX11.x86_64 0:1.5.0-4.el6 will be updated
---> Package libX11.x86_64 0:1.6.0-6.el6 will be an update
--> Processing Dependency: libX11-common = 1.6.0-6.el6 for package: libX11-1.6.0-6.el6.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.5.0-4.el6 will be updated
---> Package libX11-common.noarch 0:1.6.0-6.el6 will be an update
--> Processing Conflict: libX11-1.6.0-6.el6.x86_64 conflicts libxcb < 1.9.1-3
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package libxcb.x86_64 0:1.8.1-1.el6 will be updated
---> Package libxcb.x86_64 0:1.9.1-3.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================
Installing:
oracle-rdbms-server-12cR1-preinstall x86_64 1.0-14.el6 ol6_latest 17 k
Updating:
libxcb x86_64 1.9.1-3.el6 base 110 k
Installing for dependencies:
kernel-uek x86_64 2.6.39-400.264.1.el6uek ol6_UEK_latest 28 M
kernel-uek-firmware noarch 2.6.39-400.264.1.el6uek ol6_UEK_latest 3.7 M
ksh x86_64 20120801-28.el6.1 ol6_latest 759 k
libXv x86_64 1.0.9-2.1.el6 base 16 k
libXxf86dga x86_64 1.1.4-2.1.el6 base 18 k
libaio-devel x86_64 0.3.107-10.el6 base 13 k
libdmx x86_64 1.1.3-3.el6 base 15 k
xorg-x11-utils x86_64 7.5-6.el6 base 94 k
Updating for dependencies:
libX11 x86_64 1.6.0-6.el6 base 586 k
libX11-common noarch 1.6.0-6.el6 base 192 k
Transaction Summary
============================================================================================================================================
Install 9 Package(s)
Upgrade 3 Package(s)
Total download size: 34 M
Is this ok [y/N]: y
Downloading Packages:
(1/12): kernel-uek-2.6.39-400.264.1.el6uek.x86_64.rpm | 28 MB 00:02
(2/12): kernel-uek-firmware-2.6.39-400.264.1.el6uek.noarch.rpm | 3.7 MB 00:00
(3/12): ksh-20120801-28.el6.1.x86_64.rpm | 759 kB 00:00
(4/12): libX11-1.6.0-6.el6.x86_64.rpm | 586 kB 00:00
(5/12): libX11-common-1.6.0-6.el6.noarch.rpm | 192 kB 00:00
(6/12): libXv-1.0.9-2.1.el6.x86_64.rpm | 16 kB 00:00
(7/12): libXxf86dga-1.1.4-2.1.el6.x86_64.rpm | 18 kB 00:00
(8/12): libaio-devel-0.3.107-10.el6.x86_64.rpm | 13 kB 00:00
(9/12): libdmx-1.1.3-3.el6.x86_64.rpm | 15 kB 00:00
(10/12): libxcb-1.9.1-3.el6.x86_64.rpm | 110 kB 00:00
(11/12): oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64.rpm | 17 kB 00:00
(12/12): xorg-x11-utils-7.5-6.el6.x86_64.rpm | 94 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------
Total 5.3 MB/s | 34 MB 00:06
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
You have mail in /var/spool/mail/root
9.使用vnc等图形化安装 直接下一步
只安装软件
安装单实例

安装目录


检查安装环境
以上对安装环境进行检查时,有一些内核参数设置有问题,可以直接运行runfixup.sh来修复
修复后可以再检查一下。
下一步,忽略tmp报警,直接安装
安装完使用root执行以下两个脚本

[root@odb12c ~]# /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 to oinstall.
The execution of the script is complete.
[root@odb12c ~]# /U01/app/oracle/product/12c/db_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /U01/app/oracle/product/12c/db_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.
10.使用DBCA建库
设置数据库的一些信息


11.安装完成
[oracle@odb12c ~]$ ps -ef | grep pmon
oracle 10279 13111 0 11:08 pts/0 00:00:00 grep pmon
oracle 12465 1 0 Sep11 ? 00:00:16 ora_pmon_odb12c
[oracle@odb12c ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Sep 14 11:10:12 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select open_mode from v$database;
OPEN_MODE
------------------------------------------------------------
READ WRITE
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26390465/viewspace-1798901/
,如需转载,请注明出处,否则将追究法律责任。