一、基础环境配置
1、关闭系统防火墙
systemctl stop firewalld systemctl disable firewalld
2、关闭selinux
vim /etc/selinux/config SELINUX=disabled
3、准备安装oracle安装所需依赖
说明:下载安装oracle时所需依赖的rpm包,然后制作本地yum源进行安装rpm依赖包
下载地址:https://pan.baidu.com/s/1zg6DUG0BTxY7H63lj78CrA 提取码:2ucb
base.zip放在/root路径下解压
unzip base.zip
创建离线yum源:
备份原有repo文件,建个bakup文件夹把原路径下的文件放进去
创建local.repo文件
echo "[local]" > /etc/yum.repos.d/local.repo echo "name=local" >> /etc/yum.repos.d/local.repo echo "enable=1" >> /etc/yum.repos.d/local.repo echo "baseurl=file:///root/base" >> /etc/yum.repos.d/local.repo echo "gpgcheck=0" >> /etc/yum.repos.d/local.repo
yum clean all
4、安装oracle-database-preinstall
链接:https://pan.baidu.com/s/11TGhQ8H95umuV5PRUrfEcw 提取码:3yru
yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
可能会出现如下报错:
解决上面报错:
1.可以从以下网站缺少的依赖软件包:
https://rpmfind.net/linux/rpm2html/search.php?query=kernel-headers&submit=Search+...&system=centos&arch=
2.使用rpm命令手工安装缺少的依赖软件包
rpm -i glibc-devel-2.17-317.el7.x86_64.rpm
二、安装Oracle 19c
1、安装Oracle 19c
下载地址:https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
初始化Oracle数据库:
/etc/init.d/oracledb_ORCLCDB-19c configure
配置环境变量:
su - oracle
vim /home/oracle/.bash_profile 加入以下内容: export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin export ORACLE_SID=ORCLCDB
登陆oracle数据库:
sqlplus / as sysdba
修改密码:
alter user system identified by 123456;
重新登录:
========================
ORACLE19C的sqlnet.ora配置:
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME) SQLNET.AUTHENTICATION_SERVICES=(ALL) SQLNET.ALLOWED_LOGON_VERSION_SERVER=8 SQLNET.ALLOWED_LOGON_CLIENT=8 SQLNET.INBOUND_CONNECT_TIMEOUT=0 SQLNET.EXPIRE_TIME=10
以上配置可解决兼容低版本客户端、客户端超时卡慢、dblink等问题,重启监听后生效
lsnrctl stop
lsnrctl start
其中兼容低版本客户端的,在用户已经创建的情况下要再修改一次密码才能生效。
标签:ORACLE19C,etc,离线,repo,Centos7.9,yum,oracle,local,19c From: https://www.cnblogs.com/wwzd/p/16643149.html