天天看點

RHEL5下oracle10的安裝簡介

RHEL5下oracle10的安裝簡介

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708011shNE.jpg"></a>

我的系統為RHEL5 以上為核心版本,目前系統時間,已經要安裝的軟體,我暫且放在根目錄下

解壓檔案

[root@localhost /]# unzip 10201_database_linux32.zip

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708013TEli.jpg"></a>

建立使用者 : 建立安裝oracle時需要用到的使用者及組:

[root@localhost /]# groupadd dba

[root@localhost /]# groupadd oinstall

使用者: 主組改為oinstall,輔助組為dba

[root@localhost /]# useradd -g oinstall -G dba -d /home/oracle -m oracle

[root@localhost /]# passwd oracle

Changing password for user oracle.

New UNIX password:

BAD PASSWORD: it is WAY too short

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708015hW17.jpg"></a>

建立安裝目錄結構: 同時建立多個目錄

[root@localhost /]# mkdir -p /opt/oracle/product/10.2.0/db_1

改變目錄的所有者為oracle使用者:

[root@localhost /]# chown -R oracle /opt/oracle

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708016rgYx.jpg"></a>

修改版本

[root@localhost /]# vi /etc/redhat-release

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708017wp0F.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708019OmRs.jpg"></a>

安裝gcc 等必要的軟體包

[root@localhost Server]# rpm -ivh --aid gcc* --force –nodeps

[root@localhost Server]# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm libXp-devel-1.0.0-8.1.el5.i386.rpm

打開xmanager 的passive模式

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708022mqCS.jpg"></a>

輕按兩下打開就行了

切換到oracle使用者:

設定顯示及語言:

[root@localhost Server]# su - oracle

[oracle@localhost ~]$ export DISPLAY=192.168.1.95:0

[oracle@localhost ~]$ export LANG=""

[oracle@localhost ~]$ cd /database/

[oracle@localhost database]$ ls

doc install response runInstaller stage welcome.html

[oracle@localhost database]$ ./runInstaller

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708024FDJw.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_12587080252g1o.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_12587080285i6W.jpg"></a>

修改路徑,暫時不建立資料庫

Next

短暫等待後

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708031zVH6.jpg"></a>

預設

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708035kiMm.jpg"></a>

有一個警告資訊,可以忽略不計

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_12587080399FZQ.jpg"></a>

Yes

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708042iGQJ.jpg"></a>

Install

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708045gMQY.jpg"></a>

這裡會稍微慢一些

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708048NjU3.jpg"></a>

以管理者執行這兩條指令

[root@localhost ~]# /home/oracle/oraInventory/orainstRoot.sh

[root@localhost ~]# /opt/oracle/product/10.2.0/db_1/root.sh

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708050H8g6.jpg"></a>

紅圈處回車即可

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708053Q3I7.jpg"></a>

執行ok

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708056iUAe.jpg"></a>

Exit退出

安裝oracle結束後:

需要修改環境變量:

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708057X2ut.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708058IgIx.jpg"></a>

源檔案

末尾處添加如下語句

export ORACLE_BASE=/opt/oracle/product/10.2.0

export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1

export ORACLE_SID=db1

export PATH=$ORACLE_HOME/bin:$PATH

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708059d96J.jpg"></a>

儲存退出

[oracle@localhost ~]$ source .bash_profile

執行以下source指令

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708061ihzy.jpg"></a>

登入資料庫,quit退出 執行指令dbca

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708062FPA3.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708064RsdO.jpg"></a>

建立一個資料庫

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708066I6KV.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708069PSc5.jpg"></a>

資料庫的名字,db1

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708071yl4Z.jpg"></a>

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708074uKNi.jpg"></a>

輸入密碼

這些預設即可

Finish完成

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_125870809298zY.jpg"></a>

Ok

完成後退出即可

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708100hkr5.jpg"></a>

[oracle@localhost ~]$ sqlplus / as sysdba

SQL&gt; select name from v$database

查詢指令

SQL&gt; shutdown immediate

關閉資料庫

<a href="http://yuzeying.blog.51cto.com/attachment/200911/20/644976_1258708101YuIS.jpg"></a>

本文轉自 yuzeying1 51CTO部落格,原文連結:http://blog.51cto.com/yuzeying/230290