产品:Oracle数据库
版本:18.14.0.0.210420
环境:Red Hat Enterprise Linux Server 7.9 (Maipo)
Oracle数据库18c单实例安装部署文档
需求确认
环境部署
安装数据库软件
补丁安装
安装数据库(构建)ADG可忽略)
创建监听(构建)ADG可忽略)
| 序号 | 需求项 | 需求明细 | 备注 |
|---|---|---|---|
| 1 | 操作系统版本 | Red Hat Enterprise Linux Server 7.9 (Maipo) | |
| 2 | 系统软件包 | 挂载操作系统镜像 | |
| 3 | 网卡 | 网卡:用于与主库同步数据,IP网卡上配置地址; | |
| 4 | IP地址 | 192.168.1.11 | |
| 5 | 主机名 | xsjan1 | 主机名小写不需要下划线 |
| 6 | 本地存储 | / 50GB /tmp 50GB /home 100GB /u01 100GB /oradata 1.5TB /oraarch 500G | |
| 7 | 外置存储 | 无 | |
| 8 | 交换分区 | 16GB | |
| 9 | 开放协议 | ssh、vncview | |
| 10 | 集群版本 | 无 | |
| 11 | 集群基本目录 | 无 | |
| 12 | 集群家目录 | 无 | |
| 13 | 集群用户 | 无 | |
| 14 | 集群用户家目录 | 无 | |
| 15 | 数据库版本 | Oracle 18.14.0.0.210420 | |
| 16 | 基本数据库目录 | /u01/app/oracle/ | |
| 17 | 数据库家目录 | /u01/app/oracle/product/18.0.0/db_1 | |
| 18 | 数据库用户 | oracle | |
| 19 | 用户家目录数据库 | /home/oracle | |
| 20 | 数据库字符集 | ZHS16GBK | |
| 21 | 国际字符集数据库 | AL32UTF16 | |
| 22 | 连接数 | 2000 | |
| 23 | 唯一的数据库 | xsjan | |
| 24 | 数据库名 | xsjan | |
| 25 | 数据库类型 | 非容器数据库 | |
| 26 | 实例名 | xsjan | |
| 27 | 数据文件目录 | /oradata/xsjan | |
| 28 | 在线日志目录 | /oradata/xsjan | |
| 29 | 归档文件目录 | /oraarch/xsjan | |
| 30 | 回闪目录 | /oraarch/xsjan | |
| 31 | 闪光目录大小 | 500G |
1、安装依赖包
通过YUM或挂载操作系统镜像安装
yum -y install bc binutils compat-libcap1 compat-libstdc -33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc libstdc libstdc -devel libxcb make policycoreutils policycoreutils-python smartmontools sysstat gcc gcc-c librdmacm-devel net-tools nfs-utils python python-configshell python-rtslib python-six targetcli psmisc
操作系统依赖包参考官方文件:
https://docs.oracle.com/en/database/oracle/oracle-database/18/ladbi/supported-red-hat-enterprise-linux-7-distributions-for-x86-64.html#GUID-2E11B561-6587-4789-A583-2E33D705E498
检查依赖包装的安装情况
rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" bc binutils compat-libcap1 compat-libstdc -33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc libstdc libstdc -devel libxcb make policycoreutils policycoreutils-python smartmontools sysstat gcc gcc-c librdmacm-devel net-tools nfs-utils python python-configshell python-rtslib python-six targetcli psmisc
2、配置操作系统内核参数
cat /etc/sysctl.conf
## add by oracle install ##
#setting for fs.file-max is 6815744
fs.file-max = 6815744
#setting for kernel.sem is 250 32000 100 128
kernel.sem = 250 32000 100 128
#setting for kernel.shmmni is 4096
kernel.shmmni = 4096
#setting for kernel.shmall
kernel.shmall = 23053004
#setting for kernel.shmmax
kernel.shmmax = 94425107660
#setting for kernel.panic_on_oops is 1 per Orabug 19212317
kernel.panic_on_oops = 1
#setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
#setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304
#setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144
#setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576
#setting for net.ipv4.conf.all.rp_filter is 2
net.ipv4.conf.all.rp_filter = 2
#setting for net.ipv4.conf.default.rp_filter is 2
net.ipv4.conf.default.rp_filter = 2
#setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576
#setting for net.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500
#setting for kernel.numa_balancing is 0 per Orabug: 26798697
kernel.numa_balancing = 0
参数kernel.shmmax官方建议大于物理内存的一半,单位byte
参数kernel.shmall官方建议大于或等于kernel.shmmax值/4096,单位页
MOS搜Requirements for Installing Oracle
https://support.oracle.com/epmos/faces/DocumentDisplay?id=2551169.1
执行sysctl -p使参数生效
4、配置操作系统资源限制
cat /etc/security/limits.conf
## add by oracle install ##
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock unlimited
oracle hard memlock u