暂无图片
11.2.0.4 安装(GI standalone&DB single)
最近更新:2024-05-16 15:06:41

1. 适用范围

Oracle 11g Linux 7.x

2. 概述

目前有几台大容量的主机,需要安装Oracle软件,作为Data Guard的备库,源端是Oracle 11g RAC集群,因此目标端也只能选择Oracle 11g版本。 由于硬件驱动不兼容,无法安装CentOS 6 或者 RHEL 6,因此选择 CentOS 7.4 操作系统版本。 硬件中没有RAID卡,因此需要在软件层面实现数据冗余,对比LVM、mdadm、ASM磁盘组几种方案,ASM磁盘组的方式会更适合些,因此决定使用 Grid standalone 和 single database 的方式进行安装。

3. 安装步骤

3.1 预处理

  1. 安装依赖包
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libcap1 \
compat-libstdc++-33 \
e2fsprogs \
e2fsprogs-libs \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-devel \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
ksh \
libX11 \
libXau \
libXi \
libXtst \
libxcb \
smartmontools \
unixODBC-devel \
net-tools |grep installed

查到 not installed 标注的依赖包进行安装,其中 compat-libstdc++-33 包在Linux 7.x 的yum源中可能不存在,可以在https://pkgs.org/ 中下载对应版本的rpm包。

  1. 创建用户和组
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin

/usr/sbin/useradd -u 54321 -g oinstall -G dba,asmdba,asmadmin,asmoper,oper oracle
/usr/sbin/useradd -u 54322 -g oinstall -G dba,asmadmin,asmdba,asmoper grid 

echo '******' | passwd oracle --stdin
echo '******' | passwd grid --stdin
  1. 设置时区
# 检查时区
timedatectl status
# 如果时区不是Asia/Shanghai,执行下面命令
timedatectl set-timezone Asia/Shanghai
  1. 设置域名映射,编辑 /etc/hosts,添加如下内容
xxx.xxx.xxx.xxx standalone
  1. 设置ntp服务
# 安装
yum -y install ntp

编辑 /etc/ntp.conf 文件,添加自己的ntp服务地址。

  1. 修改资源限制,在/etc/security/limits.conf 文件中添加如下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
......