oracle 12.2.0.3(19c) rpm 安装
说明: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
vim /etc/hostname
vim /etc/sysconfig/network
[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
connect / as sysdba //连接到dba
alter session set container=ORCLPDB1; //切换实例,注意,不同的实例,下面用户不一样,注意切换后操作
//查询当前实例 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;
完毕-----------------
9. 关于磁盘满了,移动相关的表空间文件的问题
https://zhuanlan.zhihu.com/p/135989729
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2020-06-08 springBoot项目打jar包后,修改配置文件中的配置项