Oracle18c单实例安装

安装环境:

CentOS release 6.5 (Final)  RAM:2GB  SWAP:4GB DISK:40GB

一. 安装环境检查

1. 服务器硬件 

Minimum RAM
  • At least 1 GB RAM for Oracle Database installations. 2 GB RAM recommended.

  • At least 8 GB RAM for Oracle Grid Infrastructure installations.

[root@orcl ~]# grep MemTotal /proc/meminfo
MemTotal:        1907580 kB

2. 操作系统

Red Hat Enterprise Linux 6.4:2.6.32-358.el6.x86_64或更高版本

--建议关闭透明大页

禁用透明HugePages

Oracle建议您禁用Transparent HugePages并使用标准HugePages来提高性能。

Oracle建议禁用Transparent HugePages,因为它们可能会导致访问内存的延迟,从而导致Oracle RAC环境中的节点重新启动,或Oracle Database单实例的性能问题或延迟。建议使用标准的HugePages for Linux。 

 3. 服务器配置

--/tmp目录

Disk space allocated to the /tmp directory

At least 1 GB of space in the /tmp directory.

 

[root@orcl ~]# df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        36G   11G   24G  32% /

 --swap

Swap space allocation relative to RAM (Oracle Database)

Between 1 GB and 2 GB: 1.5 times the size of the RAM
Between 2 GB and 16 GB: Equal to the size of the RAM
More than 16 GB: 16 GB
Note: If you enable HugePages for your Linux servers, then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space.

Swap space allocation relative to RAM (Oracle Restart)

Between 8 GB and 16 GB: Equal to the size of the RAM
More than 16 GB: 16 GB
Note: If you enable HugePages for your Linux servers, then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space.

[root@orcl ~]# grep SwapTotal /proc/meminfo
SwapTotal:       4194296 kB
[root@orcl ~]# df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           932M   72K  932M   1% /dev/shm

 --存储检查

Minimum local disk storage space for Oracle software

For Linux x86-64:
At least 6.8 GB for an Oracle Grid Infrastructure for a standalone server installation.
At least 7.5 GB for Oracle Database Enterprise Edition.
At least 7.5 GB for Oracle Database Standard Edition 2.、

 

 二. 操作系统配置

1. RPM包:

Packages for Red Hat Enterprise Linux 6

The following packages (or later versions) must be installed:

bc
binutils-2.20.51.0.2-5.36.el6.x86_64
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
e2fsprogs-1.41.12-14.el6.x86_64
e2fsprogs-libs-1.41.12-14.el6.x86_64
glibc-2.12-1.107.el6.i686
glibc-2.12-1.107.el6.x86_64
glibc-devel-2.12-1.107.el6.i686
glibc-devel-2.12-1.107.el6.x86_64
ksh
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
 -0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
libX11-1.5.0-4.el6.i686
libX11-1.5.0-4.el6.x86_64
libXau-1.0.6-4.el6.i686
libXau-1.0.6-4.el6.x86_64
libXi-1.6.1-3.el6.i686
libXi-1.6.1-3.el6.x86_64
libXtst-1.2.1-2.el6.i686
libXtst-1.2.1-2.el6.x86_64
libXrender (i686)
libXrender (x86_64)
libXrender-devel (i686)
libXrender-devel (x86_64)
libgcc-4.4.7-3.el6.i686
libgcc-4.4.7-3.el6.x86_64
libstdc++-4.4.7-3.el6.i686
libstdc++-4.4.7-3.el6.x86_64
libstdc++-devel-4.4.7-3.el6.i686
libstdc++-devel-4.4.7-3.el6.x86_64
libxcb-1.8.1-1.el6.i686
libxcb-1.8.1-1.el6.x86_64
make-3.81-20.el6.x86_64
net-tools-1.60-110.el6_2.x86_64 (for Oracle RAC and Oracle Clusterware)
nfs-utils-1.2.3-36.el6.x86_64 (for Oracle ACFS)
smartmontools-5.43-1.el6.x86_64
sysstat-9.0.4-20.el6.x86_64

2. 确认主机名解析

[root@orcl ~]# ping orcl
PING orcl (192.168.48.10) 56(84) bytes of data.
64 bytes from orcl (192.168.48.10): icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from orcl (192.168.48.10): icmp_seq=2 ttl=64 time=0.025 ms

 3. 禁用透明大页

检查是否启用

[root@orcl ~]# cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
[always] madvise never

always表示正在使用透明大页

如何禁用请查文档。

三. 配置操作系统用户、组

1. 确定是否存在Oracle Inventory(首次安装不存在),如果不存在则创建oracle inventory用户组

注:当第一次安装Oracle软件时,OUI会创建oraInst.loc文件,该文件标识oracle inventory组的名称(默认为oinstall),以及Oracle inventory的目录

inventory_loc=central_inventory_location
inst_group=group

检测:

[root@orcl ~]# more /etc/oraInst.loc
/etc/oraInst.loc: No such file or directory

 创建Oracle Inventory用户组:

[root@orcl ~]# /usr/sbin/groupadd -g 54321 oinstall

2. 创建oracle用户

Oracle用户必须将Oracle Inventory组作为其主组,以便每个Oracle软件安装所有者都可以写入oraInventory,并能够正确设置OCR和Oracle Clusterware资源权限。数据库软件所有者还必须具有OSDBA组和(如果有)OSOPER,OSBACKUPDBA,OSDGDBA,OSRACDBA和OSKMDBA组作为辅助组。

创建组:

[root@orcl ~]# /usr/sbin/groupadd -g 54321 oinstall
[root@orcl ~]# /usr/sbin/groupadd -g 54322 dba  --SYSDBA权限
[root@orcl ~]# groupadd -g 54323 oper  --可选
[root@orcl ~]# /usr/sbin/groupadd -g 54324 backupdba --授予SYSBACKUP权限,以在rman或sqlplus执行备份恢复
[root@orcl ~]# # /usr/sbin/groupadd -g 54325 dgdba --授予SYSDG权限,执行dataguard操作
[root@orcl ~]# # /usr/sbin/groupadd -g 54326 kmdba --授予SYSKM权限,执行透明数据加密操作

创建用户:

[root@orcl ~]# /usr/sbin/useradd -u 54321 -g oinstall -G dba,backupdba,dgdba,kmdba oracle
[root@orcl ~]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.

3. Oracle用户环境要求

--将oracle用户默认文件模式创建掩码(umask)为022,以确保用户执行软件安装时创建的文件具有644权限。

[oracle@orcl ~]$ vi .bash_profile
umask 022
[oracle@orcl ~]$ umask  -验证
0022  --显示为0022 22 022则为正确配置

--检查oracle用户资源限制

Resource Shell Limit Resource Soft Limit Hard Limit

Open file descriptors

nofile

at least 1024

at least 65536

Number of processes available to a single user

nproc

at least 2047

at least 16384

Size of the stack segment of the process

stack

at least 10240 KB

at least 10240 KB, and at most 32768 KB

Maximum locked memory limit memlock at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled

 

[root@orcl ~]# vi /etc/security/limits.conf 
oracle           soft    nofile          1024
oracle           hard    nofile          65536
oracle           soft    nproc           2047
oracle           hard    nproc           16384
oracle           soft    stack           10240
oracle           hard    stack           32768
oracle           soft    memlock         3145728
oracle           hard    memlock         3145728

--设置远程终端显示

[oracle@orcl ~]$ export DISPLAY=192.168.48.11:0.0

--X11转发设置

要确保X11转发不会导致安装失败,需要为oracle用户创建用户级SSH客户端配置文件:

新用户创建可能没有.ssh文件夹,可以执行如下命令:

[oracle@orcl ~]$ ssh orcl   --orcl为hostname
The authenticity of host 'orcl (192.168.48.10)' can't be established.
RSA key fingerprint is 3c:3d:00:37:82:8f:38:84:16:cd:cf:d5:c4:47:20:39.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'orcl,192.168.48.10' (RSA) to the list of known hosts.
oracle@orcl's password: 
Last login: Thu Apr  4 22:07:12 2019 from 192.168.48.11
[oracle@orcl .ssh]$ vi config
Host *
    ForwardX11 no

--创建oracle vault用户

注:如果打算默认使用oracle database vault,则必须创建oracle database vault用户并进行配置

oracle database vault会安装数据库基础审计策略,该策略涵盖存储在oracel vault表中的访问控制配置信息,存储在oracle catalog中的信息(回滚段,表空间等),系统权限的使用以及oracle label security

--设置Oracle环境变量

[oracle@orcl ~]$ vi .bash_profile

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/18c/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

四. 安装数据库软件

[root@orcl ~]# mkdir -p /u01/app/oracle
[root@orcl ~]# mkdir -p /u01/app/oracle/product/18c/dbhome_1
[root@orcl ~]# chown -R oracle:oinstall /u01/app
[oracle@orcl ~]$ cd $ORACLE_HOME
[oracle@orcl dbhome_1]$ unzip -q /tmp/database/linuxx64_12201_database.zip 
[oracle@orcl database]$ ./runInstaller 
Starting Oracle Universal Installer...

 接着就是一路点下去即可,碰到检测不过的地方run&fix

Oracle18c单实例安装_第1张图片

 

你可能感兴趣的:(Oracle-Install)