ºìÁªLinuxÃÅ»§
Linux°ïÖú

Oracle 9iÔÚRed Hat7.1ºÍ7.2Éϵݲװ

·¢²¼Ê±¼ä:2006-07-11 09:37:34À´Ô´:ºìÁª×÷Õß:yo
±¾ÎÄÊÇÎÒÔÚ Red Hat 7.1 £¨Äں˰汾£º2.4.2-2 £©ºÍ 7.2£¨Äں˰汾£º2.4.7-10£© ÉÏ°²×° Oracle 9i (9.0.1) Êý¾Ý¿âµÄ×ܽᣬÈç¹ûÐèÒª¸ü¶àµÄÐÅÏ¢Çë²Î¿¼ Oracle µÄÎĵµ£º Oracle9i Database Documentation for Linux¡£


ÐèҪ˵Ã÷µÄÊÇ£¬ 7.1 ÒѾ­µÃµ½ÁË 9i ºÍ 9iAS µÄÑéÖ¤£¬¿ÉÒԲο¼£º " Red Hat Announces Validation Of Red Hat Linux For Oracle"£¬µ«ÊǽØÖ¹µ½ 2001ÄêÄêµ×£¬7.2 µÄÑéÖ¤»¹ÊÇûÓÐͨ¹ý¡£


ÏÂÔØ 9i ²¢¿Ì¼ CD


Oracle9i for Linux ¿ÉÒÔ´ÓÏÂÃæµÄÕ¾µãÏÂÔØ£º


http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.htm


Oracle ²¢²»ÌṩÕâЩÎļþµÄУÑéºÍ£¬ÏÂÃæÊÇÎÒ²úÉúµÄУÑéºÍ£º


$ md5sum Linux9i_Disk1.cpio.gz

Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz

f1a99eb8c8aca1d69a9eeaa8858570d7

Linux9i_Disk1.cpio.gz

f2444c0fa53c898e7d2f78c184829d7d

Linux9i_Disk2.cpio.gz

ec655402d8bc547ed031f14122da574b

Linux9i_Disk3.cpio.gz




½â¿ªÑ¹ËõÎļþ£º


gunzip Linux9i_Disk1.cpio.gz

Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz




½â¿ª´ò°üÎļþ£º


cpio -idmv < Linux9i_Disk1.cpio

cpio -idmv < Linux9i_Disk2.cpio

cpio -idmv < Linux9i_Disk3.cpio




¿ÉÒԵõ½Èý¸ö°²×°ÎļþµÄĿ¼£º


Disk1


Disk2


Disk3


ÎÒÓÃÍâÖà USB µÄ HP-8230e ¿Ì¼»ú£¬ÉÕ³öÕâÈýÕŹâÅÌ£¨²¢·Ç±ØÐëµÄ²½Ö裩£º


mkisofs -r Disk1 |

cdrecord -v --eject dev=0,0,0 speed=4 -

mkisofs -r Disk2 | cdrecord -v --eject dev=0,0,0 speed=4 -

mkisofs -r Disk3 | cdrecord -v --eject dev=0,0,0 speed=4 -

£¨É豸ºÅ¿ÉÒÔͨ¹ýÖ´ÐÐ cdrecord -scanbus µÃµ½)¡£




½»»»¿Õ¼ä


Oracle ÍƼöµÄ½»»»¿Õ¼ä´óСΪÎïÀíÄÚ´æµÄÁ½±¶»òÕß×îÉÙ 512MB£¬²ÉÓÃÁ½ÕßÖ®ÖдóµÄÄǸöÖµ¡£ÎÒ½¨ÒéʹÓøü¶àµÄ½»»»¿Õ¼ä£¬ÌرðÊÇÄãÓÐÆäËûµÄ³ÌÐòÔËÐÐÔÚ Oracle ·þÎñÆ÷ÉÏʱ£¬ÎÒµÄ PC ÓÐ 256MB Äڴ棬ÎÒʹÓÃÁË 600MB µÄ½»»»¿Õ¼ä¡£Èç¹ûÔÚ°²×° Oracle ʱûÓÐ×ã¹»µÄ½»»»¿Õ¼ä£¬ÌرðÊÇÔÚ½¨¿âʱ£¬½«»áµ¼ÖÂϵͳ¼¸·ÖÖÓûÓÐÈκη´Ó¦¡£


¼ì²é½»»»¿Õ¼ä£º


cat /proc/swaps




Ôö¼Ó½»»»¿Õ¼ä£º


dd if=/dev/zero

of=tmpswap bs=1k count=300000

chmod 600 tmpswap

mkswap tmpswap

swapon tmpswap

"binutils" RPM °æ±¾µÄÎÊÌâ

7.1 ºÍ 7.2 Ëæ´øµÄ binutils RPM °üʹ 9i µÄ Universial Installer ²»ÄÜÅÜÆðÀ´£¬Ò²Ã»Óиüеİ汾Äܽâ¾öÕâ¸öÎÊÌ⣬Äã¿ÉÒÔÓÐÁ½¸öÑ¡Ôñ£º


ÏÂÔØÏÂÃæ°æ±¾µÄ RPM °ü£¬¡°½µ¼¶¡± Oracle ·þÎñÆ÷É쵀 binutil £º


ftp://ftp.redhat.com/pub/redhat/

linux/7.0/en/os/i386/RedHat/RPMS/

binutils-2.10.0.18-1.i386.rpm




°²×°£º


rpm -Uvh --force --nodeps binutils-2.10.0.18-1.i386.rpm




°²×°Íê Oracle ºó£¬±ðÍüÁË°Ñ binutil Éý¼¶»ØÈ¥¡£


ÁíÍâÒ»¸ö¼òµ¥µÄ°ì·¨Ê±ÔÚ°²×°Öеȴý³öÏÖÏÂÃæµÄ´íÎó£¬È»ºóÊÖ¹¤ÐÞ¸´£º


"Error invoking target install of makefile /

opt/oracle/product/9.0.1/

plsql/lib/ins_plsql.mk"




Çë²Î¿¼ Running Oracle Installation ÒÔ¼° Oracle Installation Errors £¬ÎÒÍƼöʹÓõڶþÖÖ·½·¨¡£


°²×° JDK


ÏÂÔØ JDK 1.3.1 »òÕß Blackdown 1.1.8_v3£¨ÎÒ×ÜÊÇʹÓà Blackdown £¬ÕâÊÇ Oracle ÒÔÇ°ÍƼö¸ø Linux Óû§µÄ)¡£


¸ù¾Ý JDK µÄÎĵµ£¬°Ñ JDK °²×°ÔÚ /usr/local Ŀ¼Ï²¢½¨Á¢ JDK µÄ·ûºÅÁ¬½Óµ½ /usr/local/java£º


bzip2 -dc jdk118_v3-glibc-2.1.3.tar.bz2 |

tar xf - -C /usr/local ln -s /usr/local/jdk118_v3 /

usr/local/java




½¨Á¢ Oracle Óû§


groupadd dba

groupadd oinstall

useradd -g oinstall -G dba oracle

passwd oracle




½¨Á¢ Oracle Ŀ¼


mkdir /opt/oracle

mkdir /opt/oracle/product

mkdir /opt/oracle/product/9.0.1

chown -R oracle.oinstall /opt/oracle

mkdir /var/opt/oracle

chown oracle.dba /var/opt/oracle

chmod 755 /var/opt/oracle




ÉèÖÃ Oracle »·¾³


ÒÔ Oracle Óû§½øÈ룬½¨Á¢ $HOME/.bash_profile£º


# Oracle Environment

export ORACLE_BASE=/opt/oracle

export ORACLE_HOME=/opt/oracle/product/9.0.1

export ORACLE_SID=test

export ORACLE_TERM=xterm

#export TNS_ADMIN= ÉèÖÃÕâ¸ö±äÁ¿£¬Èç¹û sqlnet.ora,

tnsnames.oraµÈ²»ÔÚ$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:/

usr/openwin/lib

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/td/lib:/

usr/ucblib:/usr/local/lib

export LD_LIBRARY_PATH

# Set shell search paths:

PATH=/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/

usr/ccs/bin:/usr/openwin/bin:/opt/local/GNU/bin

PATH=$PATH:/opt/local/bin:/opt/NSCPnav/

bin:$ORACLE_HOME/bin

PATH=$PATH:/usr/local/samba/bin:/usr/ucb:

export PATH

# CLASSPATH must include the following JRE locations:

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

CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

Æô¶¯ runInstaller


Oracle ²»ÔÙÖ§³Ö×Ö·ûģʽµÄ°²×°£¬Òò´Ë±ØÐëÉèÖà DISPLAY ±äÁ¿£¬¼ÙÉè½ÚµãÃûΪ oracleserver£¬ÄÇô oracleserver ±ØÐëÔÊÐí runInstaller ÏÔʾ X ÐÅÏ¢¡£Èç¹ûÄã²»ÔÚÔ¶³Ì°²×°Êý¾Ý¿â£¬¿ÉÒÔÌø¹ýÏÂÃæµÄµÚÒ»ºÍµÚ¶þ²½¡£


µÚÒ»²½£º


yourdesktop:user$

xhost +oracleserver




µÚ¶þ²½£º´Ó oracleserver µÄ¿ØÖÆ̨ÉÏÒÔ Oracle Óû§Ö´ÐУº


oracleserver:oracle$

export DISPLAY=yourdesktop:0.0




µÚÈý²½a£º´ÓµÚÒ»ÕÅ CD £¬Ö´ÐÐ runInstaller (²»Òª cd µ½ /mnt/cdrom £¡)


oracleserver:oracle$ mount /mnt/cdrom

oracleserver:oracle$ /mnt/cdrom/runInstaller




µÚÈý²½b£º»òÕß´ÓÏÂÔص㣺


oracleserver:oracle$ Disk1/

RunInstaller




ÔËÐÐ Oracle °²×°


ÏÂÃæÊÇÎһشð runInstaller µÄÎÊÌ⣺


What would you like as

the base directory (Inventory Location):

/opt/oracle/oraInventory

UNIX Group Name (permission for updating Oracle software): oinstall

Full path name of the Oracle Home: /opt/oracle/product/9.0.1

JDK Home Directory: /usr/local/java




×¢Ò⣺


Èç¹ûûÓС°½µ¼¶¡± binutils °üµÄ»°£¬°²×°µ½µÚÈýÕÅ CD ʱ£¬Äã»á¿´µ½ÏÂÃæµÄ´íÎó£º


"Error invoking target install of makefile /opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"




½â¾öµÄ°ì·¨Çë¿´ºóÃæµÄ¡°Oracle °²×°´íÎ󡱡£


Äã¿ÉÄÜ»¹»áÅöµ½ "Oracle Net Configuration Assistant" ¹ÒÆðµÄÎÊÌ⣬Çë²Î¿¼ºóÃæµÄ¡±Oracle °²×°ÖÐÖØÒªµÄ¼¼ÇɺÍÌáʾ¡°¡£


Æô¶¯ Oracle 9i Êý¾Ý¿â


9i ÖÐÒѾ­Ã»ÓÐ svrmgrl ÁË£¬ËùÓеĹÜÀí¹¤×÷¶¼Ìý¹ý sqlplus À´Íê³É£º


dba$ sqlplus /nolog

SQL> connect / as sysdba

SQL> startup




Oracle °²×°ÖÐÖØÒªµÄ¼¼ÇɺÍÌáʾ


Èç¹ûÓöµ½ gunzip ³ö´í£¬¼ì²éÎļþµÄУÑéºÍ£º


$ md5sum Linux9i_Disk1.cpio.gz

Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz

f1a99eb8c8aca1d69a9eeaa8858570d7 Linux9i_Disk1.cpio.gz

f2444c0fa53c898e7d2f78c184829d7d Linux9i_Disk2.cpio.gz

ec655402d8bc547ed031f14122da574b Linux9i_Disk3.cpio.gz




²»Òª cd µ½ /mnt/cdrom Ö´ÐÐ ./runInstaller £¡


·ñÔòÄ㽫²»ÄÜÔÚ°²×°Ê±µ¯³ö CD£¬ÒòΪ unmount ²»ÄܰѹҽÓ×ÅµÄ CD жÏÂÀ´¡£


£¨ÒëÕß×¢£ºÎÒ°²×° 9iAS Óöµ½µÄ¾ÍÊÇÕâÑùµÄÎÊÌâ°¡£¡º¦µÃÎÒ°Ñ CD ¸´ÖƵ½Ó²ÅÌÔÙ°²×°£©¡£

Èç¹ûÍü¼ÇÁËÉèÖà DISPLAY »·¾³±äÁ¿»òÕßÍü¼Ç¸³ÓèÊý¾Ý¿â·þÎñÆ÷ÔÚ×ÀÃæ PC ÉÏÏÔʾ X ÐÅÏ¢µÄȨÏÞ(ÀýÈ磺 xhost +oracleserver)£¬½«µÃµ½ÏÂÃæµÄ´íÎó£º


Xlib: connection to ":0.0" refused by server

Xlib: Client is not authorized to connect to Server




½â¾öµÄ°ì·¨ÊÇ£ºrm -rf /tmp/OraInstall


Èç¹û²»ÕâÑù×ö£¬°²×°³ÌÐò½«¹ÒÔÚÄÇÀûÓÐÈκδíÎóÐÅÏ¢¡£Í¬Ê±Ò²Òª¼ì²é runInstaller ÊÇ·ñÔÚºǫֹ́ͣÁËÔËÐС£


µ± runInstaller ¿ªÊ¼ÅäÖù¤¾ßʱ£¬"Oracle Net Configuration Assistant" »á¹ÒÆ𣬼òµ¥µÄ½â¾ö°ì·¨ÊÇÍ£Ö¹ÆäÅäÖã¬ÖØÐÂÅäÖûòÕß¼ÌÐø°²×°£¬µ±ÆäËû°²×°½áÊøºó£¬ÔÙÀ´Ò»´Î¡°Retry"¡£


Èç¹ûÔÚ°²×°ÖÐϵͳֹͣÁË·´Ó¦£¬¿ÉÄܾÍÊÇûÓÐ×ã¹»µÄ½»»»¿Õ¼äÁË¡£Èç¹û·¢ÉúÕâÑùµÄÊÂÇ飬ֻÄܵȴýµ½ÏµÍ³·´Ó¦ÎªÖ¹¡£


Oracle µÄ°²×°»¹ÐèÒªÔËÐÐ make µÈ³ÌÐò£¬ÔÚÉú²ú»·¾³ÖУ¬Äã»òÐíûÓа²×°±àÒëÆ÷ºÍÆäËû¿ª·¢¹¤¾ß£¬ËùÒÔ£¬ÐèÒªÁÙʱ°²×°ÏÂÃæµÄ¼¸¸ö°ü£º


cpp, egcs, egcs-c++, glibc-devel, kernel-headers ¡£




Èç¹û²»Äܳɹ¦°²×° 9i ¶øÐèÒªÖØÀ´µÄ»°£¬ÐèÒªÇå³ýÏÂÃæµÄÎļþºÍĿ¼£º


rm -rf /etc/oraInst.loc /etc/oratab /tmp/OraInstall

rm -rf $ORACLE_BASE/*

/tmp/




Oracle °²×°´íÎó


ÏÂÃæÊDZðÈ˹ØÓÚ Oracle °²×°Ê±Åöµ½µÄÎÊÌâºÍ½â¾öµÄ°ì·¨£¬ÎÒ²¢Ã»ÓÐÓöµ½ÆäÖеĴó¶àÊýÎÊÌ⣬Òò´Ë²»ÄÜÈ·¶¨ÕâЩ½â´ðÊÇ·ñÕýÈ·£¬Èç¹ûÄãÓкõĽâ¾ö°ì·¨»òÕßÆäËûÎÊÌ⣬¿ÉÒÔдПøÎÒ£¬ÎÒ½«»á¼ÓÈëµ½Õâ¸öÎļþÖС£


Ê×Ïȼì²é/tmp/OraInstall ÖеĴíÎóÈÕÖ¾£¬Èç¹ûÓöµ½ make µÄ´íÎ󣬼ì²é£º


$ORACLE_HOME/install/make.log ¡£

"Error invoking target install of makefile /opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"

"Error invoking target install of makefile /opt/oracle/

product/9.0.1/precomp/lib/ins-precomp.mk"

"Error invoking target install of makefile /opt/oracle/

product/9.0.1/precomp/lib/ins-net-client"

"Error invoking target install of makefile /opt/oracle/

product/9.0.1/precomp/lib/ins-oemagent"




±à¼­ $ORACLE_HOME/bin/genclntsh °Ñ LD_SELF_CONTAINED="-z defs"


¸Ä³É£ºLD_SELF_CONTAINED=""


È»ºóÔËÐнű¾£º


$ORACLE_HOME/bin/genclntsh£º

$ $ORACLE_HOME/bin/genclntsh

Created /opt/oracle/product/9.0.1/lib/libclntst9.a

$




ÔÚ´íÎó¶Ô»°¿òÖеã»÷ ÖØÊÔ¡£


"Error in setting permissions of file/directory /opt/oracle/jre/1.1.8/bin/i686/native_threads/.

extract_args.




µ±´íÎó¿ò´ò¿ªÊ±£¬ÊÖ¹¤ÕÒµ½²¢´Ó°²×° jre µÄĿ¼Ï¿½±´Îļþ .extract_args µ½ runInstaller ÌáʾÎļþ¶ªÊ§µÄµØ·½¡£


Oracle µÄÁ´½Ó


ÔÚÎÒµÄÖ÷Ò³ÉÏÓÐһЩ Oracle µÄ Linux Á¬½Ó¡£ÎÒÖ»ÊǺ­¸ÇºÍ Linux Ïà¹ØµÄ Oracle ÎÊÌ⣬ûÓÐÉæ¼°µ½¾ßÌåµÄ Oracle ÅäÖÃÎÊÌâ¡£Äú¿ÉÒÔͨ¹ý µç×ÓÓʼþºÍÎÒÁªÏµ¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ