Ubuntu 8.10 AMD64上安裝oracle xe的一些記錄

來源:互聯網
上載者:User
Oracle這個東西,從十二年前的小型機上的7版本,到現在11g,安裝了無數次,可是每次安裝的新環境,新配置,總會出一些小問題。

系統裝的是ubuntu8.10,x64版本的。為了省事,裝了32位oracle10g的xe for debian版。
首先要安裝libaio的庫,這個也需要是32位的。

wget http://mirror.lupaworld.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.107-1ubuntu1_i386.deb
wget http://oss.oracle.com/debian/dists/unstable/non-free/binary-i386/oracle-xe-universal_10.2.0.1-1.1_i386.deb

下載完後,用 dpkg -i --force-architecture 來安裝

修改oracle用的環境變數
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_SID=XE
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

然後進入 $ORACLE_HOME/dbs目錄,拷貝init.ora為initXE.ora,把檔案裡的db_name修改為XE,
db_name=XE
shared_pool_size = 157286400
compatible = 10.2.0.1.0
其他參數可以選擇large。

然後執行
sqlplus /nolog
>connect / as sysdba
>startup

這時候會提示控制檔案不存在,因為資料庫還沒有建立
> create database XE;
> shutdown

我安裝的不知道哪有問題, 資料庫的字元集居然是asc7。所以修改一下

> startup mount
> alter system enable restricted session ;
> alter system set JOB_QUEUE_PROCESSES=0;
> alter system set AQ_TM_PROCESSES=0;
> alter database open ;
> alter database character set internal_use AL32UTF8;
> shutdown immediate
> startup

系統內建的oracle-xe,也不好用,做兩個指令碼,放在oracle用的bin目錄
dbstart
#!/bin/bash
sqlplus /nolog <<EOF
connect / as sysdba
startup
quit
EOF

dbshut
#!/bin/bash
sqlplus /nolog <<EOF
connect / as sysdba
shutdown immediate
quit
EOF

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.