环境:RedHat Enterprise Linux Advanced Server 5.2
软件:
===============================================
oracle-xe-univ-10.2.0.1-1.0.i386.rpm
http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html
===============================================
openmotif-2.2.4-0.1.i386.rpm
http://rpm.pbone.net/
===============================================
libXp-1.0.0-8.1.El5.i386.rpm
系统盘中找
===============================================
安装:
1、验证一下系统所需的主要安装包版本:
# rpm -q gcc make binutils openmotif
gcc-4.1.1-52.el5
make-3.81-1.1
binutils-2.17.50.0.6-2.el5
openmotif-2.2.4-0.1
安装openmotif-2.2.4-0.1的时候
提示 libXp.so.6:cannot open shared object file
解决:安装libXp-1.0.0-8.1.El5.i386.rpm之后再安装openmotif-2.2.4-0.1
2、创建 Oracle 组和用户帐户
接下来,创建用于安装和维护 Oracle 10g的 Linux 组和用户帐户。用户帐户将称为 oracle,而组将称为 oinstall 和 dba。执行以下命令:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
设置 oracle 帐户的口令:输密码的时候都是没有回显的,输完就回车就好。
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd:all authentication tokens updated successfully.
4、安装Oracle
# cd /usr/local
# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
Preparing... ########################################### [100%]
package oracle-xe-univ-10.2.0.1-1.0 is already installed
# rpm -e oracle-xe-univ-10.2.0.1-1.0.i386
# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
Preparing... ########################################### [100%]
1:oracle-xe-univ ########################################### [100%]
Executing Post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to
configure the database.
然后就安装它的提示走,
# /etc/init.d/oracle-xe configure
根据提示设置8080、1521端口,还有sys和system的密码,开机是否启动等。
Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to http://127.0.0.1:8080/apex
同样,把环境变量加上去
# 默认实例,名字不能该
export ORACLE_SID=XE
# 默认主目录
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
# bin目录
export PATH=$PATH:$ORACLE_HOME/bin
reboot,现在用netstat看看8080和1521是否已经监听了。
# netstat –tnl
如果有
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN
此时安装完成
开机,登陆用oracle帐户
sqlplus "/ as sysdba"即可