View | Details | Raw Unified | Return to bug 17638
Collapse All | Expand All

(-)chapter.sgml (+217 lines)
Lines 394-399 Link Here
394
    </sect2>
394
    </sect2>
395
  </sect1>
395
  </sect1>
396
396
397
  <sect1 id="oracle">
398
    <title>Installing Oracle</title>
399
400
    <para><emphasis>Contributed by Marcel Moolenaar
401
      <email>marcel@cup.hp.com</email></emphasis></para>
402
403
    <sect2>
404
      <title>Preface</title>
405
      <para>This document describes the process of installing Oracle
406
    8.0.5 and Oracle 8.0.5.1 Enterprise Edition for Linux onto a
407
    FreeBSD machine</para>
408
    </sect2>
409
410
    <sect2>
411
      <title>Installing the Linux environment</title> 
412
      <para>Make sure you have both linux_base and linux_devtools from
413
      the ports collection installed. These ports are added to the
414
      collection after the release of FreeBSD 3.2. If you are using
415
      FreeBSD 3.2 or an older version for that matter, update your
416
      ports collection. You may want to consider updating your FreeBSD
417
      version too. If you run into difficulties with linux_base-6.1 or
418
      linux_devtools-6.1 you may have to use version 5.2 of these
419
      packages.</para>
420
421
      <para>If you want to run the intelligent agent, you'll
422
      also need to install the Red Hat tcl package:
423
      <filename>tcl-8.0.3-20.i386.rpm</filename>.  The general command
424
      for installing packages with the official RPM port is :</para>
425
426
      <screen>&prompt.root; <userinput>rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <replaceable>package</replaceable></userinput></screen>
427
428
      <para>Installation of the package should not generate any
429
      errors.</para>
430
    </sect2>
431
432
    <sect2>
433
      <title>Creating the Oracle environment</title> 
434
      <para>Before you can install Oracle, you need to set up a proper
435
      environment.  This document only describes what to do
436
      *specially* to run Oracle for Linux on FreeBSD, not what has
437
      been described in the Oracle installation guide.</para>
438
439
      <sect3 id="kernel-tuning">
440
        <title>Kernel Tuning</title> 
441
	<para>As described in the Oracle installation guide, you need
442
	to set the maximum size of shared memory. Don't use SHMMAX
443
	under FreeBSD. SHMMAX is merely calculated out of SHMMAXPGS
444
	and PGSIZE. Therefore define SHMMAXPGS. All other options can
445
	be used as described in the guide. For example:</para>
446
447
<LITERALLAYOUT>
448
<emphasis>options SHMMAXPGS=10000</emphasis>
449
<emphasis>options SHMMNI=100</emphasis>
450
<emphasis>options SHMSEG=10</emphasis>
451
<emphasis>options SEMMNS=200</emphasis>
452
<emphasis>options SEMMNI=70</emphasis>
453
<emphasis>options SEMMSL=61</emphasis>
454
</LITERALLAYOUT>
455
        <para>Set these options to suit your intended use of
456
        Oracle.</para>
457
458
	<para>Also, make sure you have the following options in your
459
	kernel config-file:</para>
460
461
<LITERALLAYOUT>
462
<emphasis>options SYSVSHM #SysV shared memory</emphasis>
463
<emphasis>options SYSVSEM #SysV semaphores</emphasis>
464
<emphasis>options SYSVMSG #SysV interprocess communication</emphasis>
465
</LITERALLAYOUT>
466
      </sect3>
467
468
      <sect3 id="oracle-account">
469
        <title>Oracle account</title> <para>Create an Oracle account
470
	just as you would create any other account. The Oracle account
471
	is special only that you need to give it a Linux shell.  Add
472
	<filename>/compat/linux/bin/bash</filename> to
473
	<filename>/etc/shells</filename> and set the shell for the
474
	Oracle account to
475
	<filename>/compat/linux/bin/bash</filename>.</para>
476
477
      </sect3>
478
479
      <sect3 id="environment">
480
        <title>Environment</title>
481
	<para>Besides the normal Oracle variables, such as ORACLE_HOME
482
	and ORACLE_SID you must set the following environment
483
	variables:</para>
484
485
<LITERALLAYOUT>
486
<emphasis>LD_LIBRARY_PATH=$ORACLE_HOME/lib
487
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
488
PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin</emphasis>
489
</LITERALLAYOUT>
490
491
        <para>It is advised to set all the environment variables in
492
        <filename>.profile</filename>. A complete example is:</para>
493
494
<programlisting>ORACLE_BASE=/oracle; export ORACLE_BASE
495
ORACLE_HOME=/oracle; export ORACLE_HOME
496
LD_LIBRARY_PATH=$ORACLE_HOME/lib
497
export LD_LIBRARY_PATH
498
ORACLE_SID=ORCL; export ORACLE_SID
499
ORACLE_TERM=386x; export ORACLE_TERM
500
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
501
export CLASSPATH
502
PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin
503
export PATH</programlisting>
504
      </sect3>
505
506
    </sect2>
507
508
    <sect2>
509
      <title>Installing Oracle</title> 
510
511
      <para>Due to a slight inconsistency in the Linux emulator, you
512
      need to create a directory named <filename>.oracle</filename> in
513
      <filename>/var/tmp</filename> before you start the
514
      installer. Either make it world writable or let it be owner by
515
      the oracle user. You should be able to install Oracle without
516
      any problems.  If you have problems, check your Oracle
517
      distribution and/or configuration first! After you have
518
      installed Oracle, apply the patches described in the next two
519
      subsections.</para>
520
521
      <para>A frequent problem is that the TCP protocol
522
      adapter is not installed right. As a consequence, you cannot
523
      start any TCP listeners. The following actions help solve this
524
      problem:</para>
525
526
      <screen>
527
      &prompt.root; <userinput>cd $ORACLE_HOME/network/lib</userinput>
528
      &prompt.root; <userinput>make -f ins_network.mk ntcontab.o</userinput>
529
      &prompt.root; <userinput>cd $ORACLE_HOME/lib</userinput>
530
      &prompt.root; <userinput>ar r libnetwork.a ntcontab.o</userinput>
531
      &prompt.root; <userinput>cd $ORACLE_HOME/network/lib</userinput>
532
      &prompt.root; <userinput>make -f ins_network.mk install</userinput>
533
      </screen>
534
535
      <para>Don't forget to run <filename>root.sh</filename>
536
      again!</para>
537
538
    <sect3 id="patch-root">
539
      <title>Patching root.sh</title>
540
    
541
      <para>When installing Oracle, some actions, which need to be
542
performed as root, are recorded in a shell script called
543
root.sh. root.sh is written in the orainst directory. Apply the
544
following patch to root.sh, to have it use to proper location of chown
545
or alternatively run the script under a Linux native shell.</para>
546
547
<programlisting>
548
*** orainst/root.sh.orig Tue Oct 6 21:57:33 1998
549
--- orainst/root.sh Mon Dec 28 15:58:53 1998
550
***************
551
*** 31,37 ****
552
# This is the default value for CHOWN
553
# It will redefined later in this script for those ports
554
# which have it conditionally defined in ss_install.h
555
! CHOWN=/bin/chown
556
#
557
# Define variables to be used in this script
558
--- 31,37 ----
559
# This is the default value for CHOWN
560
# It will redefined later in this script for those ports
561
# which have it conditionally defined in ss_install.h
562
! CHOWN=/usr/sbin/chown
563
#
564
# Define variables to be used in this script
565
</programlisting>
566
567
    <para>When you don't install Oracle from CD, you can path the
568
    source for <filename>root.sh</filename>.  It is called rthd.sh and
569
    is located in the orainst directory in the source tree.</para>
570
571
    </sect3>
572
573
    <sect3 id="patch-tcl">
574
      <title>Patching genclntsh</title>
575
576
      <para>The script genclntsh is used to create a single shared
577
client library.  It is used when building the demos. Apply the
578
following patch to comment out the definition of PATH:</para>
579
580
581
<programlisting>
582
*** bin/genclntsh.orig Wed Sep 30 07:37:19 1998
583
--- bin/genclntsh Tue Dec 22 15:36:49 1998
584
***************
585
*** 32,38 ****
586
#
587
# Explicit path to ensure that we're using the correct commands
588
#PATH=/usr/bin:/usr/ccs/bin export PATH
589
! PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH
590
#
591
# each product MUST provide a $PRODUCT/admin/shrept.lst
592
--- 32,38 ----
593
#
594
# Explicit path to ensure that we're using the correct commands
595
#PATH=/usr/bin:/usr/ccs/bin export PATH
596
! #PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH
597
#
598
# each product MUST provide a $PRODUCT/admin/shrept.lst
599
</programlisting>
600
601
    </sect3>
602
    </sect2>
603
    <sect2>
604
      <title>Running Oracle</title>
605
606
      <para>When you have followed the instructions, you should be
607
able to run Oracle as if it was run on Linux itself. Wether that is
608
good or bad, depends on how you value Linux :-) Until we have a native
609
FreeBSD version of Oracle supported by Oracle, I think Oracle for
610
Linux is a good alternative.</para>
611
    </sect2>
612
  </sect1>
613
397
  <sect1>
614
  <sect1>
398
    <title>Advanced Topics</title>
615
    <title>Advanced Topics</title>

Return to bug 17638