龙蜥anolis8.8部署Oracle19c

一、安装前准备

step 1: 安装介质下载:

官网下载地址:(需要oracle的账号)
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c

云盘下载地址:
链接:https://pan.xunlei.com/s/VNis7oE1VDr86WLc5767luPbA1?pwd=2teh#

二、上传安装介质

step 2:上传安装介质到服务器

三、yum源缺少包安装

step 3:安装上传到服务器的rpm包

rpm -ivh compat-libcap1-1.10-1.x86_64.rpm
rpm -ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm

在这里插入图片描述

step 4:解决安装过程中报错

dnf -y install /lib64/libnsl.so.1

在这里插入图片描述

四、配置hosts

step 5:将本机IP和本机名添加到hosts

vim /etc/hosts
192.168.1.2 oracle

五、数据库安装

step 6:执行预安装(root用户执行)

dnf -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

在这里插入图片描述

step 7:安装oracle(root用户执行)

dnf  -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm

在这里插入图片描述

step 8:初始化数据库(root用户执行)

/etc/init.d/oracledb_ORCLCDB-19c configure

在这里插入图片描述

step 9:配置环境变量(oracle用户执行)

su - oracle
vi .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
stty erase ^h
export NLS_LANG="AMERICAN_AMERICA.UTF8"

在这里插入图片描述

source .bash_profile

五、数据库基本操作

1、通过sqlplus访问数据库(oracle用户执行)

sqlplus / as sysdba

2、修改system用户的密码

alter user system identified by Rofine321;

3、创建表空间

CREATE TABLESPACE JXKH LOGGING DATAFILE '/home/oracle/jxkh.dbf'  SIZE 500M AUTOEXTEND ON NEXT 32M MAXSIZE 3000M EXTENT MANAGEMENT LOCAL;

4、创建临时表空间

create temporary tablespace JXKH_temp tempfile '/home/oracle/JXKH_temp.dbf' size 300m autoextend on next 32m maxsize 800m extent management local;

5、解决Oracle创建用户报ORA-65096错的解决

alter session set "_ORACLE_SCRIPT"=true;

6、创建用户

create user JXKH identified by Rofine321 default tablespace JXKH temporary tablespace JXKH_temp;

7、修改用户密码

alter user JXKH identified by Rofine321;

8、授权

grant connect,resource to JXKH;

9、ORA-01950: 对表空间 ‘USERS’ 无权限(插入数据时的报错解决)

alter user JXKH quota unlimited on users;

EOF

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值