oracle9i安装for linux

本文可自由转载,但请遵循“署名-非商业用途-保持一致”的创作共用协议。 永久链接:JoeCen's 小猫窝
-----------------------------

是看着一篇经典的oracle9i安装文档(英文)装上的。
那篇文档写得太详尽了,我这里只整理了在linux安装时要注意的东西。

因为偷懒,所以就不翻译了。

一、检测是否安装了需要的rpm包:
RH 7.1, 7.2, and RH AS 2.1:
#rpm -q gcc cpp compat-libstdc++ glibc-devel kernel-headers binutils

RH 7.3, 8.0, and 9:
#rpm -q gcc cpp compat-libstdc++ glibc-devel glibc-kernheaders binutils

RHEL AS 3:
rpm -q gcc cpp compat-libstdc++ glibc-devel glibc-headers glibc-kernheaders binutils

二、检查内存和swap

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

三、增加share memory

I temporarely increased the shmmax setting for the kernel by executing the following command:
$ su - root
# cat /proc/sys/kernel/shmmax
33554432
# echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax
# cat /proc/sys/kernel/shmmax
1073741824
It is recommended to increase the shmmax setting permanently for Oracle. For more information, see Setting Shared Memory.

For more information on optimizing shared memory settings for Oracle databases on Linux, see Setting Shared Memory. These parameters apply to all Red Hat Linux versions. But note that except for the shmmax parameter, these parameter do not need to be changed for installing Oracle on Linux. But you might want to adjust all shared memory settings later to optimize the server for Oracle.

四、检查tmp的容量
(tmp目录大概需要1G左右的空间)
To check the space in /tmp, run:
$ df /tmp
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 //tmp
chown root.root //tmp
chmod 1777 //tmp
export TEMP=/ # used by Oracle
export TMPDIR=/ # 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 //tmp
unset TEMP
unset TMPDIR

五、配置环境变量
# 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

(使用 soure .bash_profile 可以让.bash_profile立即生效。)

六、远程安装
1、xwin32
用gdm。修改/etc/X11/gdm/gdm.conf,把"[xdmcp]"下面的部分改成代码:
Enable=true
然后在文本模式下执行“gdm”命令。成功的话会在linux上出现一个登陆画面。

2、用vmware

准备一个在vmware安装的redhat,我们叫它“yourdesk”,安装oracle的机器叫“oracleserver”。
首先:
oracleserver:$ su - oracle
oracleserver:oracle$ export DISPLAY=yourdesktop:0.0(或不要“.0") (最好用IP而不用主机名)

然后:
yourdesktop:# startx
在图形界面的终端下:
#xhost +oracleserver
#ssh oracleserver
#su - oracle
#export DISPLAY=yourdesktop:0.0
# DISK1/runInstall
即可弹出oracle的安装界面。

(可能要先安装x-window,可能要在ssh到oracleserver之前,先运行).

七、遇到ins_ctx.mk错误
安装到后面的时候,会有提示:
"Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk"

这时,Edit the file $ORACLE_HOME/ctx/lib/env_ctx.mk, go to "INSO_LINK =", and add a "$(LDLIBFLAG)dl" to the line and save it.

press "retry".

随机日志

  • 配置apt-get使用socks代理
  • syslog日志截断的问题
  • 紧张一天
  • 廉价航空与安全
  • 向浪漫之都进发
  • Leave a Reply