PLUM
首页
分类
归档
关于我
离线部署Oracle19c
## 安装 下载[oracle-database-preinstall](https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm "oracle-database-preinstall")和[oracle-database](https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html "oracle-database")并上传至服务器 #### 安装oracle-database-preinstall ```shell #安装后会自动创建oralce用户和组 rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm ``` #### 安装Oracle ```shell rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm ``` #### 初始化Oracle ```shell /etc/init.d/oracledb_ORCLCDB-19c configure ``` ## 配置 #### 新增环境变量 ```shell #新增文件 vi /etc/profile.d/oracle.sh #添加内容 export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin export ORACLE_SID=ORCLCDB export NLS_LANG="AMERICAN_AMERICA.UTF8" #使内容生效 source /etc/profile ``` #### 连接Oracle ```shell #修改Oracle用户密码 passwd oracle #切换到Oracle用户 su oracle #登录Oracle sqlplus / as sysdba #修改数据库system用户密码 alter user system identified by "xxxxxxx"; ``` #### 自启动PDB ```shell #查看PDB show pdbs; #创建触发器自启动所有PDB CREATE TRIGGER open_all_pdbs AFTER STARTUP ON DATABASE BEGIN EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN'; END open_all_pdbs; / ``` #### 放行端口 ```shell #查看端口开启信息 firewall-cmd --list-ports #放行1521端口 firewall-cmd --zone=public --add-port=1521/tcp --permanent #重载防火墙 firewall-cmd --reload ``` #### 开机自启动Oracle ```shell #编辑文件 vi /etc/oratab #将N改成Y,允许自启动 ORA19C:/opt/oracle/product/19c/dbhome_1:Y #编辑启动加载文件 vi /etc/rc.d/rc.local #添加内容 su oracle -lc "/opt/oracle/product/19c/dbhome_1/bin/lsnrctl start" su oracle -lc /opt/oracle/product/19c/dbhome_1/bin/dbstart #授执行权限 chmod +x /etc/rc.d/rc.local ``` ## 可能遇到的问题 #### 缺少依赖 可以到[rpmfind](https://rpmfind.net/ "rpmfind")或官方仓库下载,注意可能存在多层依赖和相互依赖,确保版本一致,rpm ivh *.rpm批量安装
赞赏
支付宝
微信
作者:
这个人很懒
发表时间:
2022-03-19 11:41
浏览量:
113
版权声明:转载请注明出处
评论
发布
目录
留言
评论