Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 2002 01:30:04 -0700 (PDT)
From:      Khorev Sergey <Khorev@SoftLab.RU>
To:        freebsd-doc@FreeBSD.org
Subject:   RE: docs/42058: Documentation: Installing Oracle 8i onto FreeBSD
Message-ID:  <200210020830.g928U4br000880@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/42058; it has been noted by GNATS.

From: Khorev Sergey <Khorev@SoftLab.RU>
To: 'Giorgos Keramidas' <keramida@FreeBSD.org>
Cc: "'bug-followup@FreeBSD.org'" <bug-followup@FreeBSD.org>
Subject: RE: docs/42058: Documentation: Installing Oracle 8i onto FreeBSD
Date: Wed, 2 Oct 2002 12:40:04 +0400 

 In order to submit the right patch:
 
 
 Index: chapter.sgml
 ===================================================================
 RCS file:
 /home/ncvs/doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml,v
 retrieving revision 1.76
 diff -u -r1.76 chapter.sgml
 --- chapter.sgml	Thu Aug 29 14:35:44 2002
 +++ chapter.sgml	Tue Sep 10 10:48:57 2002
 @@ -925,6 +925,323 @@
      </sect2>
    </sect1>
  
 +  <sect1 id="linuxemu-oracle8i">
 +    <sect1info>
 +      <authorgroup>
 +	<author>
 +	  <firstname>Sergey</firstname>
 +	  <surname>Khorev</surname>
 +	  <contrib>Contributed by </contrib>
 +	</author>
 +	<!-- khorev@softlab.ru -->
 +      </authorgroup>
 +    </sect1info>
 +    <title>Installing Oracle 8i</title>
 +
 +    <indexterm>
 +      <primary>applications</primary>
 +      <secondary><application>Oracle</application></secondary>
 +    </indexterm>
 +
 +    <sect2>
 +      <title>Preface</title>
 +      <para>This document describes the process of installing Oracle 8iR3
 (8.1.7) for 
 +      Linux onto a machine running FreeBSD 4.5-RELEASE</para>
 +    </sect2>
 +    
 +    <sect2>
 +      <title>Installing the Linux Environment</title>
 +      
 +      <para>Make sure you have both <filename>linux_base-6.1</filename> and
 +	<filename>linux_devtools-6.1</filename> packages installed. Also the
 file
 +	<filename>/compat/linux/etc/mtab</filename> must exist. Without it
 the installer fails. 
 +     
 +      <screen>&prompt.root; <userinput> cp /etc/fstab
 /compat/linux/etc/mtab </userinput></screen>
 +
 +      <para>You need to download and install Linux JDK-1.1.8 from 
 +        <ulink url="ftp.blackdown.org">ftp.blackdown.org</ulink>.</para>
 +
 +      <screen>&prompt.root; <userinput>tar xjfC
 jdk118_v3-glibc-2.1.3.tar.bz2 /compat/linux/usr/ </userinput></screen>
 +      <screen>&prompt.root; <userinput>cd /compat/linux/usr/jdk118_v3/
 </userinput></screen>
 +      <screen>&prompt.root; <userinput>ln -s . linux </userinput></screen>
 +      <screen>&prompt.root; <userinput>echo echo i686 >
 /compat/linux/bin/arch </userinput></screen>
 +      <screen>&prompt.root; <userinput>chmod +x /compat/linux/bin/arch
 </userinput></screen>
 +      <screen>&prompt.root; <userinput>cd /compat/linux/usr/
 </userinput></screen>
 +      <screen>&prompt.root; <userinput>mkdir local </userinput></screen>
 +      <screen>&prompt.root; <userinput>mkdir local/bin
 </userinput></screen>
 +      <screen>&prompt.root; <userinput>cd local </userinput></screen>
 +      <screen>&prompt.root; <userinput>ln -s ../jdk118_v3/ java
 </userinput></screen>
 +
 +    </sect2>
 +
 +    <sect2>
 +      <title>Creating the Oracle Environment</title>
 +      
 +      <para>Before you can install Oracle, you need to set up a proper
 +	environment. You should read and understand the Oracle installation
 guide.</para>
 +
 +      <sect3 id="linuxemu-kernel-tuning8i">
 +        <title>Kernel Tuning</title>
 +	<indexterm><primary>kernel tuning</primary></indexterm>
 +	
 +	<para>As described in the Oracle installation guide, you need to set
 +	  the maximum size of shared memory.  Do not use
 +	  <literal>SHMMAX</literal> under FreeBSD. <literal>SHMMAX</literal>
 +	  is merely calculated out of <literal>SHMMAXPGS</literal> and
 +	  <literal>PGSIZE</literal>.  Therefore define
 +	  <literal>SHMMAXPGS</literal>.  All other options can be used as
 +	  described in the guide.  For example:</para>
 +
 +	<programlisting># System V shared memory and tunable parameters
 +options         SYSVSHM         # include support for shared memory
 +options         SHMMAXPGS=16384 # max amount of shared memory pages (4k on
 i386)
 +options         SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)"
 +                                # max shared memory segment size (bytes)
 +options         SHMMIN=2        # min shared memory segment size (bytes)
 +options         SHMMNI=100      # max number of shared memory identifiers
 +options         SHMSEG=10       # max shared memory segments per process
 +
 +# System V semaphores and tunable parameters
 +options         SYSVSEM         # include support for semaphores
 +options         SEMMNI=100      # number of semaphore identifiers in the
 system
 +options         SEMMSL=61       # max number of semaphores per id
 +options         SEMMNS=61       # number of semaphores in the system
 +options         SEMOPM=101      # max number of operations per semop call
 +
 +# System V message queues and tunable parameters
 +options         SYSVMSG         # include support for message
 queues</programlisting>
 +	
 +        <para>Set these options to suit your intended use of Oracle.</para>
 +
 +      </sect3>
 +
 +      <sect3 id="linuxemu-oracle-account8i">
 +	
 +        <title>Oracle Account</title>
 +
 +	<para>Create an Oracle account just as you would create any other
 +	  account. The  Oracle account is special only that you need to give
 +	  it a Linux shell.  Add <filename>/compat/linux/bin/bash</filename>
 to
 +	  <filename>/etc/shells</filename> and set the shell for the Oracle
 +	  account to <filename>/compat/linux/bin/bash</filename>.</para>
 +      <screen>&prompt.root; <userinput>	pw groupadd -n dba
 </userinput></screen>
 +      <screen>&prompt.root; <userinput>	pw useradd oracle -g dba -m
 -s /compat/linux/bin/bash </userinput></screen>
 +      </sect3>
 +
 +      <sect3 id="linuxemu-environment-8i">
 +        <title>Environment</title>
 +
 +	<para>According to Oracle's installation guide you are to
 +	  set some environment variables. Here Oracle is installed in /ora
 and
 +          FORA is a name of the database. The <envar>LANG</envar> is
 unsetted to avoid problems
 +          with the installer. The best place
 +	  to set them is <filename>/home/oracle/.profile</filename>: </para>
 +          <programlisting>ORACLE_BASE=/ora; export ORACLE_BASE
 +ORACLE_HOME=$ORACLE_BASE/app; export ORACLE_HOME
 +LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
 +ORACLE_SID=FORA; export ORACLE_SID
 +PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin
 +PATH=$PATH:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin
 +PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin
 +export PATH
 +umask 022
 +unset LANG</programlisting>
 +      </sect3>
 +    </sect2>
 +
 +    <sect2>
 +      <title>Installing Oracle</title> 
 +      
 +      <para>First of all you need to patch the installation. It can be done
 in two ways:
 +        <orderedlist>
 +          <listitem>
 +            <para>Copying the entire Oracle distribution to writable
 media.</para>
 +          </listitem>
 +          <listitem>
 +            <para>Copying some installation files:</para> 
 +            <screen>&prompt.root; <userinput>	cp -r
 /cdrom/Disk1/runInstaller /cdrom/Disk1/install . </userinput></screen>
 +          </listitem>
 +        </orderedlist>
 +        Either way a patch must be applied to
 <filename>runInstaller</filename>:
 +        <programlisting>34c34
 +< THREADS_FLAG=native
 +---
 +> THREADS_FLAG=green</programlisting>
 +        The <filename>install/oraparam.ini</filename> may be patched in two
 various fashions
 +        <orderedlist>
 +          <listitem>
 +            <programlisting>5c5
 +<
 JRE_LOCATION=../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/l
 inux
 +---
 +> JRE_LOCATION=/compat/linux/usr/jdk118_v3
 +            </programlisting>
 +          </listitem>
 +          <listitem>
 +            <programlisting>3c3
 +< SOURCE=../stage/products.jar
 +---
 +> SOURCE=/cdrom/Disk1/stage/products.jar
 +5,6c5,6
 +<
 JRE_LOCATION=../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/l
 inux
 +<
 OUI_LOCATION=../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expand
 ed
 +---
 +> JRE_LOCATION=/compat/linux/usr/jdk118_v3
 +>
 OUI_LOCATION=/cdrom/Disk1/stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFi
 les/Expanded
 +            </programlisting>
 +          </listitem>
 +        </orderedlist>
 +      </para>
 +
 +      <para>To start the installation you need to be running X Windows. 
 +      Running as the <username>oracle</username> user, issue the following
 command:
 +      </para>
 +      <screen>&prompt.user; <userinput> ./runInstaller
 </userinput></screen>
 +      <para> The second way to correct <emphasis>source file
 location</emphasis> </para>
 +      <para> On the next screen set UNIX group name to dba. 
 +      When prompted, run the script <filename>orainstRoot.sh</filename>
 under <username>root</username> account
 +      </para>
 +      <para>When selecting products to install, do not choose Enterprise
 Manager - 
 +        it's rather unstable even under Linux. You may also deselect 
 +        Oracle HTTP server, Product Options, and Java Products.
 +        <important>
 +          <para>Deselection of too many products may cause the installer to
 fail.</para>
 +        </important>
 +        Also choose to NOT use the database configuration assistant.
 +      </para>
 +
 +    <sect3 id="linuxemu-patch-root-8i">
 +      <title>Patching root.sh</title>
 +    
 +	<para>When installing Oracle, some actions, which need to be
 performed
 +	  as <username>root</username>, are recorded in a shell script
 called
 +	  <filename>root.sh</filename>. Apply the
 +	  following patch to root.sh, to have it use the proper command
 locations of
 +	  commands. Before running the script be sure the proper values
 +	  of <envar>ORACLE_HOME</envar> and <envar>ORACLE_SID</envar> were
 set.
 +        </para>
 +    	<programlisting>7c7
 +< CHOWN="/bin/chown"
 +---
 +> CHOWN="/usr/sbin/chown"
 +9c9
 +< TEST="/usr/bin/test"
 +---
 +> TEST="/bin/test"
 +86c86
 +< AWK=/bin/awk
 +---
 +> AWK=/usr/bin/awk
 +88c88
 +< CHOWN=/bin/chown
 +---
 +> CHOWN=/usr/sbin/chown
 +92,93c92,93
 +< GREP=/bin/grep
 +< LBIN=/usr/local/bin
 +---
 +> GREP=/usr/bin/grep
 +> LBIN=/compat/linux/usr/local/bin
 +98c98
 +< SED=/usr/local/bin/sed
 +---
 +> SED=/usr/bin/sed
 +101c101
 +< TEST=/usr/bin/test
 +---
 +> TEST=/bin/test</programlisting>
 +
 +      </sect3>
 +
 +    <sect2>
 +      <title>Running Oracle</title>
 +      
 +      <para>When you have followed the instructions, you should be able to
 run
 +	<application>Oracle</application> as if it were run on Linux 
 +	itself. Also, you can then patch Oracle to version 8.1.7.3.</para>
 +      <sect3>
 +        <title>Quick Running Oracle </title>
 +        <para> For those who are new to Oracle and want to
 +          quickly test installation, perform those steps as the
 <username>oracle</username> user</para>
 +        <procedure>
 +          <step>
 +            <screen>&prompt.user; <userinput> cd $ORACLE_HOME/dbs; cp
 init.ora initFORA.ora </userinput></screen>
 +            <para> Then edit initFORA.ora to set values:</para>
 +              <programlisting>db_name=FORA
 +control_files = (/ora/data/FORA/ctl1.dbf,
 /ora/data/FORA/ctl2.dbf)</programlisting>  
 +          </step>
 +          <step>
 +            <screen>&prompt.user; <userinput> svrmgrl </userinput>
 +            SVRMGR> <userinput> connect internal </userinput>
 +            SVRMGR> <userinput> startup nomount </userinput>
 +            SVRMGR> <userinput> CREATE DATABASE FORA 
 +LOGFILE GROUP 1 ('/ora/data/FORA/log1.dbf') size 1M,
 +GROUP 2 ('/ora/data/FORA/log2.dbf') size 1M NOARCHIVELOG CHARACTER SET
 CL8KOI8R
 +DATAFILE '/ora/data/FORA/system1.dbf' size 50M autoextend on; </userinput>
 +            SVRMGR> <userinput> @$ORACLE_HOME/rdbms/admin/catalog.sql
 </userinput>
 +            SVRMGR> <userinput> @$ORACLE_HOME/rdbms/admin/catproc.sql
 </userinput>
 +            SVRMGR> <userinput> CREATE TABLESPACE users DATAFILE
 '/ora/data/FORA/users1.dbf'
 +SIZE 20M AUTOEXTEND ON; </userinput>
 +            SVRMGR> <userinput> CREATE TEMPORARY TABLESPACE temp TEMPFILE
 '/ora/data/FORA/temp1.dbf'
 +SIZE 10M AUTOEXTEND ON; </userinput>
 +            SVRMGR> <userinput> CREATE USER scott IDENTIFIED BY tiger
 DEFAULT TABLESPACE users
 +TEMPORARY TABLESPACE temp; </userinput>
 +            SVRMGR> <userinput> GRANT CONNECT, RESOURCE TO scott;
 </userinput>
 +            SVRMGR> <userinput> CREATE TABLESPACE rbs DATAFILE
 '/ora/data/FORA/rbs1.dbf'
 +SIZE 5M AUTOEXTEND ON; </userinput>
 +            SVRMGR> <userinput> CREATE ROLLBACK SEGMENT rbs01 TABLESPACE
 rbs; </userinput>
 +            SVRMGR> <userinput> ALTER ROLLBACK SEGMENT rbs01 ONLINE;
 </userinput>
 +            SVRMGR> <userinput> ALTER ROLLBACK SEGMENT rbs01 ONLINE;
 </userinput>
 +            SVRMGR> <userinput> connect system/manager </userinput>
 +            SVRMGR> <userinput> @$ORACLE_HOME/sqlplus/admin/pupbld.sql
 </userinput>
 +            SVRMGR> <userinput> connect scott/tiger </userinput>
 +            SVRMGR> <userinput> @$ORACLE_HOME/sqlplus/admin/demobld.sql
 </userinput>
 +            </screen>
 +          </step>
 +          <step>
 +            <para>Edit $ORACLE_HOME/dbs/initFORA.ora:</para>
 +              <programlisting>compatible = 8.1.0
 +rollback_segments = (rbs01)</programlisting>  
 +          </step>
 +          <step>
 +            <para>Now you should be able to connect to Oracle and select
 from 
 +              demonstration tables:</para>
 +            <screen>&prompt.user; <userinput> sqlplus scott/tiger
 </userinput>
 +              SQL> <userinput> SELECT DNAME, ENAME FROM EMP, DEPT
 +WHERE EMP.DEPTNO=DEPT.DEPTNO;</userinput>
 +            </screen>
 +          </step>
 +          <step>
 +            <para> Since starting Network Configuration Assistant fails,
 you need to
 +              configure the network manually. You may start from these
 sample files
 +              (place all of them in
 <filename>$ORACLE_HOME/network/admin/</filename>)
 +            </para>
 +              <programlisting># this is sqlnet.ora
 +NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)
 +# listener.ora
 +LISTENER =
 +  (ADDRESS_LIST=
 +	(ADDRESS=(PROTOCOL=tcp)(HOST=freehome)(PORT=1521))
 +	(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))	
 +
 +SID_LIST_LISTENER=
 +   (SID_LIST=
 +	(SID_DESC=
 +          (GLOBAL_DBNAME=FORA)
 +          (SID_NAME=FORA)			
 +          (ORACLE_HOME=/ora/app)
 +        )
 +   )
 +# tnsnames.ora
 +FORA=(DESCRIPTION=
 +		(ADDRESS=(PROTOCOL=TCP)(HOST=freehome)(PORT=1521))
 +		(CONNECT_DATA=(SID=FORA))
 +	)</programlisting>
 +            <para> Now you should be able to start the listener:
 <command>lsnrctl start</command>
 +              and connect through network: <command>sqlplus
 scott/tiger@FORA</command>.
 +            </para>
 +          </step>
 +        </procedure>
 +      </sect3>
 +
 +    </sect2>
 +  </sect1>
 +
    <sect1 id="sapr3">
      <sect1info>
        <authorgroup>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210020830.g928U4br000880>