linux Redhat AS4下oracle 9i安装

  • 系统补丁安装能够

rpm -ivh compat-libcwait-2.1-1.i386.rpm
rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm

安装过程这2个rpm时会报一些依赖的包未装,根据名字到网上去下载相应的包装上。

  • 配置系统参数

 dd if=/dev/zero of=tmpswap bs=1k count=2048000
 chmod 600 tmpswap
 mkswap tmpswap
 swapon tmpswap

 

vi /etc/sysctl.conf
kernel.sem=250 32000 100 128
kernel.shmmax=4294967295
kernel.shmmni=128
kernel.msgmnb=65536
kernel.msgmni=2878
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000

 

echo 65536 > /proc/sys/fs/file-max

ulimit -n 65536

ulimit -u 16384

 

setup #按界面操作,关闭防火墙

 

gcc -shared -o libcwait.so -fpic -O2 libcwait.c  #编译libcwait.c

chmod 755 libcwait.so

cp libcwait.so /usr/lib/libcwait.so

-----〉libcwait.c

#include <errno.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
pid_t
__libc_wait (int *status)
{
  int res;
  asm volatile ("pushl %%ebx/n/t"
                "movl %2, %%ebx/n/t"
                "movl %1, %%eax/n/t"
                "int /$0x80/n/t"
                "popl %%ebx"
                : "=a" (res)
                : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0), "S" (0));
  return res;
}

 

  •  

groupadd oracle   #增加oracle用户组
useradd -g oracle oracle #增加oracle用户

mkdir /usr/local/oracle  #新建安装目录

chown -R oracle.oracle /usr/local/oracle

 

vi /home/oracle/.bash_profile

export LD_PRELOAD=/usr/lib/libcwait.so
export LANG=en_us
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=/usr/local/oracle
export ORACLE_SID=test
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin

 

export LD_ASSUME_KERNEL=2.4.1  

//AS4下32位系统需要,否则会出现java错误。现象是Database configuration assistant等步骤失败。

错误日志在/home/oracle/oraInventory/logs/installActions200......log

Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2003-10-25_03-14-57PM/jre/lib/i386/libjava.so:
    symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
                                                                               
PATH=$PATH:/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwin
PATH=$PATH:/opt/local/bin:/opt/NSCPnav/bin:$ORACLE_HOME/bin
PATH=$PATH:/usr/local/samba/bin:/usr/ucb
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
export
PATH=$PATH:$HOME/bin

 

  •   安装

tar xzvf  Disk1.tar

tar xzvf  Disk2.tar

tar xzvf  Disk3.tar


chown -R oracle.oracle Disk*

 

#注意在图形模式下启动安装过程

xhost localhost     //AS4下32位系统为 xhost +

su - oracle
cd Disk1
./runinstaller

安装路径选择/usr/local/oracle

码制选择

 

注意过程中会弹出个窗口,要求在root用户下执行个root.sh脚本。

 

安装成功后,oracle已启动。

lsnrctl start #启动侦听  

  • 启动/停止oracle

su - oracle

lsnrctl start
sqlplus /nolog

>conn /as sysdba
>startup
>exit

 

su - oracle

lsnrctl stop

sqlplus /nolog

>conn /as sysdba
>shutdown
>exit

 

侦听配置文件在$ORACLE_HOME/network/admin/tnaname.ora

 

你可能感兴趣的:(linux Redhat AS4下oracle 9i安装)