天天看点

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