Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle for Solaris & Linux???

Re: Oracle for Solaris & Linux???

From: John Meijer <meijer_at_DONTSPAMME.pathcom.com>
Date: 20 Apr 1998 11:19:50 -0400
Message-ID: <ia1zusldux.fsf@corsair.i-have-a-misconfigured-system-so-shoot-me>

David:

There is a URL on the web but it is quite dated as of the last time I checked it. Here are some instructions posted by Bob Withers awhile back, I have added a couple of steps I needed in my setup.

Right now I have JDBC working, and so could develop Java apps, however I have not yet tried embedded SQL in C code. I think this might be problematic as the libraries required to link the code are in COFF format, which may not be linkable by the linux linker. Let me know if you have any success in this area.
Cheers,
John.


Here is a procedure for installing the SCO version of Oracle on Linux. Known to work with:

         SCO Unix Releases 7.3.2.1.0 and 7.3.2.2.0

The version of Linux I installed it on was:

         Slackware 3.3
         Linux kernel 2.0.30

	also

	 RedHat 4.2
	 Linux kernel 2.0.30

Ensure you have a recent version of iBCS. I know that this works with version 2.0-10.

Machines used:

         HP Pavilion 7330Z	233Mhz Pentium Clone PC
         166 Mhz Pentium	64Mb RAM
         32MB Ram		3.0 Gb HD
         2.5G Hard drive

This procedure resulted in a fully functional (as far as I can tell) Oracle installation including all utilities and SQL*Net for IPC and TCP/IP protocols.

I have not been able to develop applications for Oracle because the Linux version of ld does not understand the SCO coff format object files in the Oracle libraries. If anyone could help with this it would be appreciated.

                            Download the Database

0) Here is the URL for a 60-day evaluation download.

   The files are about 160Mb to download. Or get the CD.

http://www.oracle.com/products/oracle7/workgroup_server/sco/html/download.html

                            Install the Database

  1. Login as root.
  2. Create the oracle Linux user ID in group dba. Specify the ORACLE_HOME directory (/usr/oracle/7.3.2.2.0) as the home directory.
            groupadd dba
            adduser

3) Create a home directory for user oracle. This will also be the value

    assigned to ORACLE_HOME.

            mkdir /usr/oracle
            mkdir /usr/oracle/7.3.2.2.0
            chown -R oracle:dba /usr/oracle

3a) Create these directories:

$ORACLE_HOME/rdbms/log,
$ORACLE_HOME/rdbms/audit
$ORACLE_HOME/network/log

        Add:
            export ORACLE_HOME=/usr/oracle/7.3.2.2.0
            export ORACLE_SID=orcl
            export ORACLE_TERM=vt100

        Modify export PATH to add $ORACLE_HOME/bin

5) Login as user oracle.

6) Copy all install CD files to the oracle home directory.

            cp -r /cdrom/* .

7) Uncompress all CD files just copied.

            find . -name *_ -exec ~/orainst/oiuncomp {} \;

8) Mark the oracle shadow process to run setuid 'oracle'

            chmod u+s $ORACLE_HOME/bin/oracle

9) Make a copy of init.ora for the orcl SID and modify it:

            cd $ORACLE_HOME/dbs
            cp init.ora initorcl.ora

        Add the following line:

            db_name = orcl

        Find the line "ifile = ora_system:initps.ora" and comment it out
        by placing a # at the beginning.

  1. Create a script file for database creation in the oracle home directory called makedb.sql.
        connect internal
        set echo on
        spool makedb.log
        create database orcl
            maxinstances 1
            maxlogfiles 8
            datafile '/usr/oracle/7.3.2.2.0/dbs/sysorcl.dbf' size 20M
reuse
            logfile
                '/usr/oracle/7.3.2.2.0/dbs/redo01orcl.dbf' size 4M reuse,
                '/usr/oracle/7.3.2.2.0/dbs/redo02orcl.dbf' size 4M reuse,
                '/usr/oracle/7.3.2.2.0/dbs/redo03orcl.dbf' size 4M reuse;
        @rdbms/admin/catalog.sql
        create rollback segment r0 tablespace system
            storage (initial 16k next 16k minextents 2 maxextents 20);
        alter rollback segment r0 online;
        create tablespace users
            datafile
                '/usr/oracle/7.3.2.2.0/dbs/usersorcl.dbf' size 40M reuse
            default storage
            (
                initial 1M
                next    1M
                pctincrease 0
                minextents  9
                maxextents  50
            );
        create rollback segment r1 tablespace users
            storage (optimal 9M);
        alter rollback segment r1 online;
        connect system/manager
        @rdbms/admin/catdbsyn.sql
        connect internal
        @rdbms/admin.catproc.sql
        connect system/manager
        @sqlplus/admin/pupbld.sql
        spool off

  1. Start svrmgrl and create the database.

        A log of all activity will be placed in $ORACLE_HOME/makedb.log

  1. Connect to SQL*Plus and create a user:
            sqlplus system/manager
            create user <user> identified by <psw> default tablespace users;
            exit

        Supply your own <user> and <psw>.

  1. Login as root and change the owner and persmissions of the Oracle ulimit increase utility:
            chown root:root $ORACLE_HOME/bin/osh
            chmod u+s $ORACLE_HOME/bin/osh

  1. To save space I have removed the contents of the following directories under $ORACLE_HOME. I'm not sure what they are all for but, so far, I haven't noticed any adverse affects. The disk space recovered by this was about 170M.
                $ORACLE_HOME/guicommon2
                $ORACLE_HOME/md
                $ORACLE_HOME/orainst
                $ORACLE_HOME/ows

  1. The Pro* precompilers (Pro*C, Pro*Ada, Pro*Fortran, and Pro*Cobol can be removed from the bin directory if you don't plan to use them. This results in a saving of about 17M.
                rm $ORACLE_HOME/bin/pro*

  1. The development libraries can be removed if they are not going to be used for a savings of about 30M.
                       Configuring SQL*Net for TCP/IP

  1. Create a listener.ora file in $ORACLE_HOME/network/admin. Following is an example.

LISTENER =
  (ADDRESS_LIST =

        (ADDRESS =
          (PROTOCOL=tcp)
          (HOST=rebel)                  #<--  Use YOUR machines HOST NAME
          (PORT=1521)
          (COMMUNITY=UK_SUP_TCPIP)
        )
        (ADDRESS=
          (PROTOCOL=ipc)
          (KEY=700)
          (COMMUNITY=UK_SUP_IPC)
        )

  )

# This tells the listener of DEDICATED services it can connect you to #
SID_LIST_LISTENER=
  (SID_LIST=

        (SID_DESC=
          (SID_NAME=orcl)
          (ORACLE_HOME=/usr/oracle/7.3.2.2.0) #<-- Put YOUR $ORACLE_HOME
        )

  )

# These parameters control TRACE and LOG output - Set them to suit you #
TRACE_LEVEL_LISTENER = OFF #<-- Set to ADMIN for tracing #TRACE_DIRECTORY_LISTENER = /tns_admin/log #<-- Trace output goes here TRACE_FILE_LISTENER = "listener"
#LOG_DIRECTORY_LISTENER = /tns_admin/log #<-- Log output goes here LOG_FILE_LISTENER = "listener"

# Miscellaneous parameters
#
CONNECT_TIMEOUT_LISTENER = 10 #<-- Allow 10 seconds new connects

STOP_LISTENER            = YES
DBA_GROUP                = dba           #<-- Put your DBA group here
# PASSWORDS_LISTENER     = manager       #<-- Uncomment for a password
# -----------------------------------------------------------------------
-

2) Create a tnsnames.ora file in $ORACLE_HOME/network/admin. Following

    is an example:

orcl =

    (

        DESCRIPTION =
        (ADDRESS=(PROTOCOL=IPC) (KEY=700))
        (CONNECT_DATA=(SID=orcl) (SERVER=DEDICATED))     )

# Sample TCP/IP Aliases
#
orcl =

    (

        DESCRIPTION =
        (ADDRESS=(PROTOCOL=TCP) (HOST=rebel) (PORT=1521)) #<-- Put your
HOST
        (CONNECT_DATA=(SID=orcl) (SERVER=DEDICATED))
    )

3) Start the Oracle TNS listener:

        lsnrctl start

4) Configure your client machine tnsnames.ora file to have an entry for your Linux box. The entry for my Win95 box looks like this:

rebel.world =
  (DESCRIPTION =
    (ADDRESS_LIST =

        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = rebel)
          (Port = 1521)
        )

    )
    (CONNECT_DATA = (SID = ORCL)
    )
  )

5) You can start and stop the Oracle listener with the commands:

            lsnrctl start
            lsnrctl stop

    For some reason the listener takes a few minutes to start, I'm     not sure why. You can find out about other lsnrctl commands by     entering:

            lsnrctl help

                     Starting and Stopping the Database

There are utilities to start and stop the database in the
$ORACLE_HOME/bin directory called dbstart and dbshut. I have not been
able to get them to work. These utilities require a file, /etc/oratab, that looks like this:

orcl:/usr/oracle/7.3.2.2.0:Y

As shipped these files don't work properly because they rely on the presence of sqldba to determine the version of Oracle installed. You can fix them as follows:

        vi $ORACLE_HOME/bin/dbstart

            Find:  "VERSION="5" and change it to "VERSION="7"
            Find:   "sqldba <<EOF" and change it to "svrmgrl <<EOF"

        vi $ORACLE_HOME/bin/dbshut

            Find:   "sqldba <<EOF" and change it to "svrmgrl <<EOF"

These scripts will not work to start and stop the database. Even with these scripts working I chose to create my own which I called startora and stopora.

startora:

        svrmgrl <<EOF
        connect internal
        startup
        exit
        EOF
        lsnrctl start

stopora:

        lsnrctl stop
        svrmgrl <<EOF
        connect internal
        shutdown
        exit
        EOF

Don't forget to chmod +x startora stopora. Received on Mon Apr 20 1998 - 10:19:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US