Oracle 19c rpm安装

Oracle 19c rpm安装

下载地址:https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html

(1)、关闭系统防火墙。
systemctl stop firewalld
systemctl disable firewalld

(2)、关闭selinux。
vim /etc/selinux/config
SELINUX=disabled

(3)、安装依赖包。
yum install compat-libcap1 compat-libstdc++-33 glibc-devel ksh libaio-devel libstdc++-devel

(4)、安装preinstall包。
rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

(5)、安装database包。
yum install -y oracle-database-ee-19c-1.0-1.x86_64.rpm

(6)、初始化数据库。
/etc/init.d/oracledb_ORCLCDB-19c configure

(7)、配置环境变量。
//切换到oracle账户
su oracle
//编辑环境变量
vi ~/.bashrc
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export ORACLE_SID=ORCLCDB
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/.local/bin:$HOME/bin

//使环境变量生效
source ~/.bashrc

(8)、访问。
sqlplus / as sysdba
sqlplus /@orclcdb as sysdba;
sqlplus system/123456@localhost:1521/orclcdb
sqlplus system/123456@//192.168.20.124:1521/orclcdb

//查询当前实例
select name from v$database;

//修改密码
alter user system identified by 123456;

发表回复

您的电子邮箱地址不会被公开。