Centos安装Oracle DataBase19c

Centos安装Oracle DataBase19c

    • 安装前准备
    • Oracle下载
    • 安装pre
    • 安装DataBase
    • 初始化数据库
    • 设置环境变量
    • 切换到Oracle用户
    • 配置数据库

安装前准备

yum update (可选)
yum install -y compat-libcap1 compat-libstdc+±33 gcc-c++ ksh libaio-devel libstdc+±devel elfutils-libelf-devel fontconfig-devel libXrender-devel libXtst

Oracle下载

pre安装包
https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/index.html
oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
企业版
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c
oracle-database-ee-19c-1.0-1.x86_64.rpm

安装pre

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

安装DataBase

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

初始化数据库

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

设置环境变量

/etc/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用户

su oracle

配置数据库

切换容器
alter session set container = ORCLPDB1;

创建表空间
CREATE TABLESPACE --- DATAFILE '/opt/oracle/oradata/---.dbf' SIZE 200M AUTOEXTEND ON EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

创建用户
CREATE USER --  IDENTIFIED BY -- DEFAULT TABLESPACE -- ;

授权
grant connect,resource to --;
grant unlimited tablespace to grantliu;
grant create database link to grantliu;
grant select any sequence,create materialized view to grantliu;
grant create any table to grantliu;
grant resource,dba to grantliu;
grant select any table to grantliu;

grant select on v_$statname to grantliu;
grant select on v_$sesstat to grantliu;
grant select on v_$session to grantliu;
grant select on v_$mystat to grantliu;

你可能感兴趣的:(oracle,数据库,服务器)