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
發佈了65 篇原創文章 · 獲贊 20 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章