关于oracle:Oracle21C-单机安装

5次阅读

共计 4483 个字符,预计需要花费 12 分钟才能阅读完成。

一、阐明

本次装置将应用 Oracle 通用安装程序 (OUI) 装置 Oracle 数据库软件以及数据库
1.1 Linux 下 Oracle 操作系统要求
Oracle Linux 8.1 with the Unbreakable Enterprise Kernel 6: 5.4.17-2011.0.7.el8uek.x86_64 or later
Oracle Linux 8 with the Red Hat Compatible kernel: 4.18.0-80.el8.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 4: 4.1.12-124.19.2.el7uek.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 5: 4.14.35-1818.1.6.el7uek.x86_64 or later
Oracle Linux 7.5 with the Red Hat Compatible kernel: 3.10.0-862.11.6.el7.x86_64 or later
Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later
Red Hat Enterprise Linux 7.5: 3.10.0-862.11.6.el7.x86_64 or later
SUSE Linux Enterprise Server 12 SP3: 4.4.162-94.72-default or later
SUSE Linux Enterprise Server 15: 4.12.14-23-default or later

1.2 硬件环境要求

服务器制作与体系结构 确认反对服务器制作、模型、外围体系结构和主机总线适配器 (HBA) 或网络接口控制器(NIC),以便与 Oracle 数据库和 Oracle 网格基础设施一起运行。
服务器显示卡 至多 1024×768 显示分辨率,这是 Oracle 通用安装程序须要的。
最小 RAM • 用于 Oracle 数据库装置的至多 1GB RAM。举荐 2GB 内存。• 用于 Oracle Grid 基础设施装置的至多 8 GB RAM
调配给 /tmp 目录 中至多有 1GB 的空间。/tmp 目录。
绝对于 RAM(Oracle 数据库)的替换空间调配 在 1GB 到 2GB 之间:是 RAM 大小的 1.5 倍在; 2GB 到 16 GB 之间:等于 RAM 的大小 超过 16 GB:16 GB 注:如果您为 Linux 服务器启用了 HugePages,那么在计算替换空间之前,应该从可用 RAM 中扣除调配给 HugePages 的内存。
Oracle 软件的最小本地磁盘存储空间 对于 Linux86-64:Oracle 数据库企业版至多 7.2GB。Oracle 数据库规范版本至多 7.2GB。注:Oracle 建议您调配大概 100 GB 用于在现有 Oracle 主页之上利用任何将来修补程序的额定空间。无关特定修补程序相干磁盘空间的要求,请参阅修补程序文档。

1.3 介质要求

Oracle:21.3
LINUX.X64_213000_db_home.zip

二、操作系统根底配置

2.1 检察服务器硬件和内存

应用以下命令确定服务器上的物理 RAM 大小至多 1G 以上
# grep MemTotal /proc/meminfo
确定配置的替换空间的大小
# grep SwapTotal /proc/meminfo
确定 tmp 目录空间足够 1G
# df -h /tmp(如果 /tmp 空间有余,则清理 /tmp 目录以满足磁盘空间要求。或设置 Oracle 用户环境时,还要设置 TMP 和 TMPDIR 环境变量到要应用的目录中,而不是 /tmp)确定零碎版本可能反对 19c 数据库
# uname -m

2.2 敞开防火墙

敞开运行中的服务
#systemctl stop firewalld.service
敞开操作系统自启动
#systemctl disable firewalld.service
查看敞开状况
systemctl status firewalld.service

如下,dead 示意未开启开机启动;inactive 示意当初的状态是敞开

敞开 selinux:编辑 /etc/selinux/config 文件
[root@DBServer1 ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

2.3 RPM 包装置

oracle 21C 须要以下 RPM 依赖包:
bc
binutils
compat-libcap1
compat-libstdc++33
elfutils-libelf
elfutils-libelf-devel
fontconfig-devel
glibc
glibc-devel
ksh
libaio
libaio-devel
libX11
libXau
libXi
libXtst
libXrender
libXrender-devel
libgcc
libstdc++
libstdc++-devel
libxcb
make
smartmontools
sysstat
compat-libstdc++-33-3.2.3 须要手动下载上传

挂载光驱
# mount /dev/sr0 /mnt

# cd /etc/yum.repos.d/
# mv public-yum-ol7.repo public-yum-ol7.repo.bak
# vi yum.repo
[base]
Name=base
Baseurl=file:///mnt
Enabled=1
Gpgcheck=0

yum install bc binutils  compat-libcap1  compat-libstdc++33  elfutils-libelf  elfutils-libelf-devel  fontconfig-devel  glibc  glibc-devel  ksh  libaio  libaio-devel  libX11  libXau  libXi  libXtst  libXrender  libXrender-devel  libgcc  libstdc++  libstdc++-devel  libxcb  make  smartmontools  sysstat  kmod*

2.4 用户创立

创立 oracle 用户
groupadd -g 1001 oinstall
groupadd -g 1002 dba
useradd -u 1001 -g oinstall -G dba oracle
passwd oracle ——批改 oracle 用户明码

2.5 内核参数

vi /etc/sysctl.conf
kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152
kernel.shmmax = 1/2 of physical RAM  
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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 = 1048576
执行 sysctl -p 命令使以上设置失效 

编辑 /etc/pam.d/login 增加如下内容:vi /etc/pam.d/login 
session    required     pam_limits.so

编辑 vi /etc/profile 增加如下内容:#零碎环境变量
if [/$USER = "oracle"] ; then
    if [/$SHELL = "/bin/ksh"]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
    umask 022
fi

编辑 /etc/security/limits.conf 增加如下内容:vi /etc/security/limits.conf 
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

2.6 环境变量

# su - oracle
$ vi .bash_profile
export ORACLE_BASE=/oracle/app
export ORACLE_HOME=/oracle/app/product/21.3.0/db_1
export ORACLE_SID=xxx
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

mkdir -p /oracle/app/product/21.3.0/db_1
mkdir -p /oracle/oraInventory 
chmod -R 775 /oracle
chown -R oracle:oinstall /oracle/app
chown -R oracle:oinstall /oracle/oraInventory

2.7 /etc/hosts 写入

root 用户
vi /etc/hosts
192.186.30.90(ip)zwy(主机名)

三、装置介质筹备

上传介质
LINUX.X64_213000_db_home.zip
须要留神的是,21c 须要把软件包间接解压到 ORACLE_HOME 的目录下
Oracle 用户
cd /oracle/app/product/21.3.0/db_1
unzip LINUX.X64_193000_db_home.zip

四、装置数据库软件

开始装置 RDBMS 软件

oracle 用户执行装置:
关上 Xmanager-passive
export DISPLAY=xxx.xxx.xxx.xxx:0.0(xxx.xxx.xxx.xxx 为操作机器的 IP 0.0 为 xxmanager 的端口)
cd $ORACLE_HOME
./runInstaller
装置截图如下:

这里只抉择装置软件,实例在软件装置好后再装置
抉择装置单实例

抉择企业版


这里填写在环境变量里配置过的 ORACLE_BASE




五、DBCA 建库


咱们抉择高级配置

抉择数据库模版

确定数据库实例名以及是否创立容器数据库








正文完
 0