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