redhat 9.3 安装oracle 19

前言:安装注意事项

a.swap空间确认是否是16G

b.x11确认是否安装

c.java确认是否正确,并设置java环境变量

  dnf install install java-11-openjdk java-11-openjdk-devel

d.compat-libcap1-1.10-7.el7.x86_64缺少,DNF安装不了时官方下载RPM安装

 

https://yum.oracle.com/repowatch/oraclelinux7.x86_64/ol7_latest/02cf6cd3abdca6e59b5979f78a762e8883af73f5?display=filelist

 

1、关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld

2、关闭seLINUX

sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

3、安装所需的包

yum install -y
 bc \
 binutils \
 compat-openssl11 \
 elfutils-libelf \
 fontconfig \
 glibc \
 glibc-devel \
 ksh \
 libaio \
 libasan \
 liblsan \
 libX11 \
 libXau \
 libXi \
 libXrender \
 libXtst \
 libxcrypt-compat \
 libgcc \
 libibverbs \
 libnsl \
 librdmacm \
 libstdc++ \
 libxcb \
 libvirt-libs \
 make \
 policycoreutils \
 policycoreutils-python-utils \
 smartmontools \
 sysstat \

 

3、建立组和用户

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle

4、修改oracle密码

passwd oracle

5、建立安装目录

mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
mkdir -p /u01/app/oraInventory

chown -R oracle:oinstall /u01
chmod -R 775 /u01

6、修改Sysctl.conf参数,在/etc/sysctl.conf中添加:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
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

7、重新:

sysctl -p

8、修改Limit.conf参数,在/etc/security/limits.conf中添加:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

9、切换oracle用户:su - oracle

10.修改环境变量,[oracle@cjcos ~]$ vim .bash_profile

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

11、更新:source .bash_profile

上传文件到/tmp
解压文件:unzip 
12、安装./runInstanll

13、检查关机自启动:vim /etc/oratab

orcl:/data1/opt/oracle/app/oracle/product/19/dbhome_1:N
将上面的N改为Y

14、检查监听:lsnrctl status

 

posted @ 2025-11-21 16:11  hopeccie  阅读(4)  评论(0)    收藏  举报