RedHatAS2.1下Apache2.0.49+oracle9.2.0的安装

发表于:2007-07-04来源:作者:点击数: 标签:
所需程序包 ship_9204_ linux _disk1.cpio.gz ship_9204_linux_disk2.cpio.gz ship_9204_linux_disk3.cpio.gz httpd-2.0.49.tar.gz php -4.3.6.tar.gz binutils-2.10.91.0.2-3.i386.rpm jre118_v3-glibc-2.1.3.tar.gz jdk118_v3.tar.gz env_ctx.mk 一.Oracl

  所需程序包
  ship_9204_linux_disk1.cpio.gz ship_9204_linux_disk2.cpio.gz ship_9204_linux_disk3.cpio.gz httpd-2.0.49.tar.gz php-4.3.6.tar.gz binutils-2.10.91.0.2-3.i386.rpm jre118_v3-glibc-2.1.3.tar.gz jdk118_v3.tar.gz env_ctx.mk
  
  一.Oracle的安装
  1).确认你已安装了以下兼容包:
  #rpm -q gcc cpp compat-libstdc++ glibc-devel kernel-headers binutils
  #rpm -Uvh --force --nodeps binutils-2.10.91.0.2-3.i386.rpm
  #gunzip ship_9204_linux_disk1.cpio.gz ship_9204_linux_disk2.cpio.gz ship_9204_linux_disk3.cpio.gz
  #cpio –idvm <ship_9204_linux_disk1.cpio ship_9204_linux_disk2.cpio ship_9204_linux_disk3.cpio
  #vi /etc/sysctl.conf
  kernel.shmmax=536870912
  kernel.shmmni=4096
  kernel.shmall=2097152
  kernel.sem=250 32000 100 128
  fs.file-max=65535
  net.ipv4.ip_local_port_range=1024 65000
  #groupadd dba
  #groupadd oinstall
  #useradd –g oinstall –G dba oracle
  #passwd oracle
  #vi /home/oracle/.bash_profile
  
  . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
  export LD_ASSUME_KERNEL=2.2.5
  export LDEMULATION=elf_i386_glibc21
  export GCC_EXEC_PREFIX=/usr/i386-glibc21-linux/lib/gcc-lib/
  export ORACLE_BASE=/home/oracle
  export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
  export PATH=$PATH:$ORACLE_HOME/bin
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
  export ORACLE_SID=jackylau
  export ORACLE_TERM=vt100
  export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
  umask 022
  #mkdir –p /home/oracle/product/9.2.0
  #chown –R oracle.oinstall /home/oracle
  #mkdir /var/opt/oracle
  #chown oracle.dba /var/opt/oracle
  #chmod 755 /var/opt/oracle
  重启
  以oracle用户进入系统
  #tar zxvf glibc-2.1.3-stubs.tar.gz
  #cp setup_stubs.sh /home/oracle
  #./setup_stubs.sh
  #tar zxvf jdk118_v3.tar.gz
  #mv jdk118_v3 /usr/local
  #ln –s /usr/local/jdk118_v3 /usr/local/java
  #tar zxvf jre118_v3-glibc-2.1.3.tar.gz
  $./Disk1/runInstaller
  第一个错误信息:Error in invoking target install of makefile
  /home/oracle/product/9.2.0/ctx/lib/ins_xt.mk
  这就是env_ctx.mk的过错,新开一个konsole窗口,把下载的env_ctx.mk copy 到$ORACLE_HOME/ctx/lib/目录下,然后Retry。
  第二个错误信息:stubs/libc.so.tmp
  #mkdir $ORACLE_HOME/lib/stubs
  #cp /usr/lib/libc.so $ORACLE_HOME/lib/stubs/libc.so.tmp
  可能会在装完数据库后在做dbca之类时失败
  #killall jre
  #cp jre118_v3 $ORACLE_HOME
  #ln –s jre118_v3 JRE
  $dbca
  
  二.装apache+php
  !)把系统安装盘的第二张拿过来
  #mount /dev/cdrom;cd /mn/cdrom
  #cd RedHat/RPM
  #rpm –vUh binutils
  #tar zxvf httpd-2.0.49.tar.gz
  #tar zxvf php-4.3.6.tar.gz
  #cd httpd-2.0.49
  #./configure –prefix=/usr/local/apache –enable-so;make;make install
  #cd
  #cd php-4.3.6
  #./configure --prefix=/usr/local/apache/php
  --with-apxs2=/usr/local/apache/bin/apxs
  --with-config-file-path=/usr/local/apache/php
  --enable-sockets
  --with-oracle=/home/oracle/product/9.2.0 --with-oci8=/home/oracle/product/9.2.0
  --enable-shared-pdflib
  --with-pdflib=/usr/local/
  --with-freetype-dir=/usr/ --with-jpeg-dir=/usr/ --with-png-dir=/usr/ --with-zlib --enable-track-vars
  #make;make install
  #cp php.ini-dist /usr/local/apache/php/php.ini
  #vi /usr/local/apache/php/php.ini
  register_globals = On
  disable_functions = phpinfo
  创建自启动脚本
  1) apache
  #vi /bin/start_apache
  
  #!/bin/sh
  ORACLE_HOME=/home/oracle/product/9.2.0
  ORACLE_SID=jackylau
  export ORACLE_HOME ORACLE_SID
  echo "Oracle Home: $ORACLE_HOME"
  echo "Oracle SID: $ORACLE_SID"
  echo Starting Apache
  /usr/local/apache/bin/apachectl start
  
  #chmod 755 /bin/start_apache
  #ln –s /bin/start_apache /etc/rc3.d/S99httpd
  2) oracle
  #vi /etc/rc3.d/S99orastart
  su - oracle -c "dbstart"
  su - oracle -c "lsnrctl start"
  #chmod 755 /etc/rc3.d/S99orastart

原文转自:http://www.ltesting.net