- 從官網下載 適用於 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