oracle 12c r2 在redhat7上安装

1. 操作系统版本

[[email protected] ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.3 (Maipo)

2. 操作系统包要求

[[email protected] yum.repos.d]# vi yum.sh

yum install -y binutils-*

yum install -y compat-libcap1-*

yum install -y compat-libstdc++-*

yum install -y gcc-*

yum install -y gcc-c++-*

yum install -y glibc-*

yum install -y glibc-devel-*

yum install -y ksh

yum install -y libaio-*

yum install -y libaio-devel-*

yum install -y libgcc-*

yum install -y libstdc++-*

yum install -y libstdc++-devel-

yum install -y libXi-*

yum install -y libXtst-*

yum install -y make-*

yum install -y sysstat-*

yum install -y unixODBC*

 

chmod +x yum.sh

 

3. 操作系统内核配置

vi /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 4294967296

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

 

保存退出编辑器,执行以下命令使设置生效

# sysctl -p

4. 操作系统资源配置

vi /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   32786

 

5. 操作系统SELINUX配置

/etc/selinux/config

SELINUX=disabled

 

6. 操作系统防火墙配置

systemctl stop firewalld

systemctl disable firewalld.service

 

7. 创建用户

[[email protected] ~]# groupadd oinstall

[[email protected] ~]# groupadd dba

[[email protected] ~]# useradd -g oinstall -G dba oracle

[[email protected] ~]# id oracle

uid=1000(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)

[[email protected] ~]# passwd oracle

 

8. 创建目录

创建/u01

# lvcreate -L 20G -n oracle_lv datavg

# mkfs.ext4 /dev/ datavg/oracle_lv

# cd /

# mkdir -p /u01/app/oracle

# mount  /dev/ datavg/oracle_lv  /u01

# chown -R oracle:oinstall /u01

 

修改/etc/fstab文件使创建目录重启自动挂载

vi /etc/fstab

/dev/mapper/datavg-oracle_lv             /u01   ext4    defaults        1 1

 

9. 设置用户环境变量

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1

export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH

export ORACLE_SID=orcl

TEMP=/tmp

TMPDIR=/tmp

 

export PATH TEMP TMPDIR

 

10. 安装软件

 oracle 12c r2 在redhat7上安装

 oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

 oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

11.安装数据库DBCA

 oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

 oracle 12c r2 在redhat7上安装

 

 oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装
oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装

oracle 12c r2 在redhat7上安装