所需程序包 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