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
[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