ICode9

精准搜索请尝试: 精确搜索
首页 > 数据库> 文章详细

oracle 12.2.0.3(19c) rpm 安装

2022-06-08 18:03:35  阅读:185  来源: 互联网

标签:database -- 0.3 etc 12.2 localhost oracle 19c


说明:Oracle 19c 相当于 12.2.0.3 版本,是 Oracle 12c 的最终版,所以这一版本中,不会有太多的新特性,更重要的是稳定性的增强,使得用户能够更多的迁移到12c这个主流版本中。所以现在如果上生产,19c是最好的选择。

一、 环境 centos 7 或 8 

两个包:   oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm     oracle-database-ee-19c-1.0-1.x86_64.rpm

yum 安装,需要外网

二、安装Oracle前准备

0. 修改linux 主机名

 [root@localhost etc]# hostname 

[root@clwjj dbhome_1]# vi /etc/hosts (将主机名添加到这里面来)--这里不处理可能在后面运行脚本的时候报错:[FATAL] [DBT-06103] The port (1521) is already in use.ACTION: Specify a free port.

1.关闭selinux(需重启生效)

[root@localhost /]# vi /etc/selinux/config
[root@localhost /]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled   #此处修改为disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 
[root@localhost /]# 

 

2. 上传安装包到   /tmp   目录下

3. 安装预安装包  

cd /tmp

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

4. 安装oracle 软件

cd /tmp

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

5. 初始化数据库。

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

6. 配置环境变量--oracle 用户会自动创建

//切换到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

备注:oracle 的安装路径是  /opt/oracle 这个是默认的不会改变

7. 访问

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;

 

8. 创建用户:

查看pdbs 实例:--由于开启了租户模式,所以用户是建在pdbs下面

 

--启动容器

alter pluggable database ORCLPDB1 open;

 --保存容器当前状态,避免主机/orcl服务重启时,pdb自动关闭
alter pluggable database all save state;

--切换容器
alter session set container=ORCLPDB1;

--创建用户

create user ehrds2022 identified by ehrds2022;

 

 

 完毕-----------------

 

标签:database,--,0.3,etc,12.2,localhost,oracle,19c
来源: https://www.cnblogs.com/leolzi/p/16356636.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有