作者:高铭杰
邮箱:jackgo73@outlook.com
日期:2017年8月9日
1. 引言
本指南介绍如何在 CentOS 7.1(64 位)上利用快速安装的功能部署 Oracle 数据库 12c(linuxamd64_12102_database_se2)。
参考系统:
[root@centos7 ~]# hostnamectl
Static hostname: centos7.example.com
Icon name: computer
Chassis: n/a
Machine ID: 583b4d69eaea465ea4bb96ac3b891e15
Boot ID: 931ed1af622046ebbde071a87844a7d5
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-229.11.1.el7.x86_64
Architecture: x86_64
2. 先决条件
成功安装操作系统后,请确认主机名称并在你的 DNS 上登记它。你也可选择在 /etc/hosts 内加入你的 IP 主机名
。
[root@centos7 ~]# cat /etc/hostname
centos7.example.com
将 SELinux 维持在 enforcing 模式,并启用防火墙
[root@centos7 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@centos7 ~]# firewall-cmd --state
running
把 CentOS 系统更新至最新组件
[root@centos7 ~]# yum update -y
下载 Oracle 数据库 12c 的 Linux x86-64 版本:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
3. 安装步骤
为 Oracle 数据库创建所须的操作系统用户及群组。
[root@centos7 ~]# groupadd oinstall
[root@centos7 ~]# groupadd dba
[root@centos7 ~]# useradd -g oinstall -G dba oracle
[root@centos7 ~]# passwd oracle
在 /etc/sysctl.conf 加入下列内核参数
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1987162112
kernel