在RedHat 9上安装Oracle 9i

今天找了一台破旧的PC,装了个Redhat 9上去,后来又想装Oracle9i,没想到一下就成功了,一点障碍都没有,很大程度上要归功于 Werner Puschitz的安装心得,这里写出我的操作步骤,与大家分享
硬件:Intel P4 2.5G,256M内存,40G硬盘
OS:Linux RedHat 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
    Thread model: posix
    gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
文件系统:
[root@RedHat 9.2.0]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             37848096   8578032  27347488  24% /
/dev/hda1               101089      9324     86546  10% /boot
none                    126872         0    126872   0% /dev/shm
 
root环境变量:
BASH=/bin/bash
BASH_ENV=/root/.bashrc
BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='2.05b.0(1)-release'
COLORS=/etc/DIR_COLORS.xterm
COLUMNS=80
DIRSTACK=()
EUID=0
GROUPS=()
G_BROKEN_FILENAMES=1
HISTFILE=/root/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/root
HOSTNAME=RedHat
HOSTTYPE=i386
IFS=$' /t/n'
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=root
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/root
MAILCHECK=60
OLDPWD=/tmp
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
PIPESTATUS=([0]="0")
PPID=19767
PROMPT_COMMAND='echo -ne "/033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}/007"'
PS1='[/u@/h /W]/$ '
PS2='> '
PS4='+ '
PWD=/opt/oracle/product/9.2.0
QTDIR=/usr/lib/qt-3.1
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:interactive-comments:monitor:vi
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT='21.136.50.74 1078 22'
SSH_CONNECTION='21.136.50.74 1078 22.136.50.179 22'
SSH_TTY=/dev/pts/3
SUPPORTED=zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en
TERM=xterm
UID=0
USER=root
USERNAME=root
_=-k
安装介质:从oralce网站下载,三个压缩文件:
ship_9204_linux_disk1.cpio.gz
ship_9204_linux_disk2.cpio.gz
ship_9204_linux_disk3.cpio.gz
 
安装步骤:
1、解压文件:
cd /oracle9i_install
zcat /mnt/cdrom/ship_9204_linux_disk1.cpio.gz | cpio -idmv
zcat /mnt/cdrom/ship_9204_linux_disk2.cpio.gz | cpio -idmv
zcat /mnt/cdrom/ship_9204_linux_disk3.cpio.gz | cpio -idmv
解压完成后,会在当前目录下生成三个目录:
[root@RedHat 9.2.0]# ls /oracle9i_install
Disk1  Disk2  Disk3
 
2、设置Swap Space:
In order to perform a typical Oracle 9i installation and to create a simple prototype database, Oracle says that you need a minimum of 512MB of RAM for the Oracle9i (9.0.1) Server, and the amount of disk space (swap space) should be equal to twice the amount of RAM or at least 400 MB, whichever is greater.
事实上我的机器256M内存,Swap Space设为512M,成功安装。

To check the memory, run:

grep MemTotal /proc/meminfo

To check the swap space, run:

cat /proc/swaps


You can also add temporary swap space by creating a temporary swap file instead of using a raw device. Here is the procedure:

su - root

dd if=/dev/zero of=tmpswap bs=1k count=900000

chmod 600 tmpswap

mkswap tmpswap

swapon tmpswap

To disable the temporary swap space execute the following commands:

su - root

swapoff tmpswap

rm tmpswap

 

3、设置:Shared Memory

建议增加shmmax的值,否则dbca可能会报“ORA-27123: unable to attach to shared memory segment.

临时增加shmmax的值的方法:

$ su - root

# cat /proc/sys/kernel/shmmax

33554432

# echo `expr 1024 /* 1024 /* 1024` > /proc/sys/kernel/shmmax

# cat /proc/sys/kernel/shmmax

1073741824

 

4、/tmp下至少要有400的空间,或者将TEMP和TMPDIR环境变量设置到另一个目录:

If you do not have enough space in the /tmp directory, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:

su - root

mkdir /<AnotherFilesystem>/tmp

chown root.root /<AnotherFilesystem>/tmp

chmod 1777 /<AnotherFilesystem>/tmp

export TEMP=/<AnotherFilesystem>           # used by Oracle

export TMPDIR=/<AnotherFilesystem>         # used by Linux programs like the linker "ld"

When you are done with your Oracle installation, shutdown Oracle and remove the temporary directory:

su - root

rmdir /<AnotherFilesystem>/tmp

unset TEMP

unset TMPDIR

 

5、Oracle的安装目录至少需要2.5G空间

 

6、建立用户和组:

su - root

groupadd dba          # group of users to be granted with SYSDBA system privilege

groupadd oinstall     # group owner of Oracle files

useradd -c "Oracle software owner" -g oinstall -G dba oracle

passwd oracle

 

7、建立Oracle目录结构:

su - root

mkdir /opt/oracle

mkdir /opt/oracle/product

mkdir /opt/oracle/product/9.2.0

chown -R oracle.oinstall /opt/oracle

                                          

mkdir /var/opt/oracle

chown oracle.dba /var/opt/oracle

chmod 755 /var/opt/oracle

 

8、设置oracle用户的环境变量,建议将此环境变量设置加入到$HOME的.bashrc文件中:

# Set the LD_ASSUME_KERNEL environment variable only for Red Hat 9 and

# for Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3) !!

# Use the "Linuxthreads with floating stacks" implementation instead of NPTL:

export LD_ASSUME_KERNEL=2.4.1

 

# Oracle Environment

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/9.2.0

export ORACLE_SID=test

export ORACLE_TERM=xterm

# export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin

export NLS_LANG=AMERICAN;

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

export LD_LIBRARY_PATH

 

# Set shell search paths

export PATH=$PATH:$ORACLE_HOME/bin


I successfully installed Oracle9iR2 without setting the following CLASSPATH environment variable:

# CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

# CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

# export CLASSPATH

 

9、切换到oracle用户,执行/oracle9i_install/Disk1/runInstaller进行安装

 

10、安装采用图形界面,向导方式,按提示操作即可。屏幕截图请参见附件。

 

 

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值