centos8安装jdk1.8和oracle19c

行云流水
2023-06-01 / 0 评论 / 535 阅读 / 正在检测是否收录...

前言

记录centos8安装java和oracle环境的过程

jdk1.8

软件获取



安装

tar xvf jdk-8u301-linux-x64.tar.gz  -C /usr/local/
ln -s /usr/local/jdk1.8.0_301/bin/java /usr/bin/java

vim /etc/profile
JAVA_HOME=/usr/local/jdk1.8.0_301
JRE_HOME=/usr/local/jdk1.8.0_301/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

# 50几行
export JAVA_HOME JRE_HOME CLASSPATH PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

验证

java -version
jps

oracle-19c

centos8安装docker和docker-compose,然后利用docker启动oracle-19c

docker安装

centos8安装docker和docker-compose

创建目录

mkdir -p /data/oracle/oradata/
chmod 777 /data/oracle/oradata/

oracle启动配置

docker-compose.yml
version: '3'
services:
  oracle-db:
    image: registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
    container_name: oracle-db-19c
    ports:
      - "1521:1521"
      - "5500:5500"
    environment:
      - ORACLE_SID=ORCLCDB
      - ORACLE_PDB=ORCLPDB1
      - ORACLE_PWD=ora@123
      - ORACLE_EDITION=standard
      - ORACLE_CHARACTERSET=AL32UTF8
    volumes:
      - /data/oracle/oradata:/opt/oracle/oradata

验证

通过sqlplus验证
docker exec -it oracle-db-19c bash
sqlplus / as sysdba
show pdbs;

通过web验证

https://ip:5500/em

评论 (0)

取消
只有登录/注册用户才可评论