Centos7.3 minimal 安装 Oracle 11g 快捷版

  1. 从官网下载 适用于 Linux x64 的 Oracle Database 快捷版 11g 第 2 版
  2. 安装开发工具包和其他所需软件
groupinstall Development tools
yum install libaio bc flex net-tools
  1. 扩容swap,要求2Gswap,我的虚机只分了1G,扩容1G
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
mkswap /swapfile
swapon /swapfile
swapon -s
free -h
  1. 解压安装包安装
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
cd Disk1
rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm 
  1. 配置数据库
/etc/init.d/oracle-xe configure
  • http 端口号,默认8080
  • 数据库监听端口号,默认1521
  • 设置数据库密码
  • 是否开机启动 Oracle
  1. 设置环境变量
echo -e "\n. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh" >> /etc/profile
. /etc/profile
  1. 连接数据库
[root@centos2 bin]# sqlplus /nolog

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jan 1 08:46:04 2020

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> connect sys/pass as sysdba
Connected.
SQL>

参考链接

  • https://www.jianshu.com/p/58919daadf75?utm_source=oschina-app
  • https://www.cnblogs.com/LuckWJL/p/9329866.html@TOC
发布了66 篇原创文章 · 获赞 21 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/qq_35753140/article/details/103791521
今日推荐