Oracle21C单机安装⼀、说明
本次安装将使⽤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 硬件环境要求
1.3 介质要求
linux安装数据库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 /pos.d/
# po.bak
# po
[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 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 /f
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
执⾏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/f 添加如下内容:
vi /etc/f
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 x.xxx:0.x.xxx为操作机器的IP 0.0为xxmanager的端⼝) cd $ORACLE_HOME
./runInstaller
安装截图如下:
这⾥只选择安装软件,实例在软件安装好后再安装选择安装单实例
选择企业版
这⾥填写在环境变量⾥配置过的ORACLE_BASE
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论