Centos7 安裝Oracle11g Express Edition

下載

總下載頁面:https://www.oracle.com/downloads/index.html

11g速成版(不支持rman) :https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

解壓文件

$ unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

安裝依賴

$ yum -y install binutils* compat-libcap1* compat-libstdc++* gcc* gcc-c++* glibc* glibc-devel* ksh* libaio* libaio-devel* libgcc* libstdc++* libstdc++-devel* libXi* libXtst* make* sysstat* elfutils* unixODBC*

安裝

  • 到解壓后的目錄:
[wangwei@localhost ~]$ cd Disk1/
[wangwei@localhost Disk1]$ pwd
/home/wangwei/Disk1
  • 配置
[root@localhost Disk1]# /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express 
Edition.  The following questions will determine whether the database should 
be starting upon system boot, the ports it will use, and the passwords that 
will be used for database accounts.  Press <Enter> to accept the defaults. 
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of 
different passwords for each database account.  This can be done after 
initial configuration:
Password can't be null. Enter password:
Confirm the password:

Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y

Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.

到此初始化完成。

[root@localhost Disk1]# rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm 
        軟件包 oracle-xe-11.2.0-1.0.x86_64 已經(jīng)安裝

到此安裝完成。

配置和訪問

數(shù)據(jù)庫目錄:/u01/app/oracle/product/11.2.0/xe/dbs/
配置系統(tǒng)變量:

[root@localhost ~]# vim /etc/profile

加入:

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`

讓配置生效:

[root@localhost ~]# source /etc/profile

連接驗證

系統(tǒng)默認用戶SYSTEM,密碼是上面你自己設(shè)置的。

[root@localhost ~]# sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on 星期二 8月 7 18:11:38 2018

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

請輸入用戶名:  SYSTEM
輸入口令: 

連接到: 
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL> 

創(chuàng)建一個表

SQL> create table test(a int);   

表已創(chuàng)建。

SQL> insert into test values(1);

已創(chuàng)建 1 行。

SQL> select * from test;

         A
----------
         1

SQL> 
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容