一、阐明
本次装置将应用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网格基础设施一起运行。 |
---|---|
服务器显示卡 | 至多1024x768显示分辨率,这是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=baseBaseurl=file:///mntEnabled=1Gpgcheck=0yum 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.confkernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152kernel.shmmax = 1/2 of physical RAM fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.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 022fi编辑/etc/security/limits.conf 增加如下内容:vi /etc/security/limits.conf oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536
2.6环境变量
# su - oracle$ vi .bash_profileexport ORACLE_BASE=/oracle/appexport ORACLE_HOME=/oracle/app/product/21.3.0/db_1export ORACLE_SID=xxxexport PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATHmkdir -p /oracle/app/product/21.3.0/db_1mkdir -p /oracle/oraInventory chmod -R 775 /oraclechown -R oracle:oinstall /oracle/appchown -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建库
咱们抉择高级配置
抉择数据库模版
确定数据库实例名以及是否创立容器数据库