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 -> oracle howto

oracle howto

From: Steve Abatangle <sabat_at_us.oracle.com>
Date: Tue, 23 Jul 1996 10:54:12 -0700
Message-Id: <199607231754.KAA02796@roswell.us.oracle.com>


[Note: I found this information on my own. It is not supported by and does not necessarily reflect the views of Oracle Corporation.]

Installation of ORACLE V 7.0.16.4.0 for SCO Unix on Linux V 1.2.1

Prerequisites

Linux kernel

     You didn't expect this!
make

     We have a GNU make with Linux.
iBCS2 emulator V 1.2-950308

     Allows to run binaries from other Unix systems on Linux. I had this
     software in my Linux distribution in diskzc1 (german S.u.S.E.
     distribution based on Slackware). You must recompile this, if you built
     a new kernel.

five SCO Unix executables:
/bin/idar (archiver)
/bin/idas (assembler)
/bin/idld (linker)
/lib/idcpp (preprocessor)
/lib/idcomp (compiler)
     Get them, where you can, they are required for installation only.

NOTE: See the end of this file! You don't actually need them.

200MB space in /usr/local/oracle7

     This includes the RDBMS, SQL*Plus, SQL*Net TCP V1 and V2, common files,
     the installer, the stage area, messages for all languages and the
     default database. With some care, it may be possible to reduce space
     requirement to about 120 MB.

Problems during installation

Main problems were:

  1. The install procedure did not make the scripts and executables executable, the mount of the CD under Linux left permissions as 444, no RockRidge extension (?)
  2. The installer does not catch all errors, especially when attempting to compile and link libraries. One must carefully examine the install.log.
  3. It took some time and experiments to figure out that for an easy installation the SCO executables are required. As an alternative, one must generate gcc, ld, as ... for SCO systems and use them instead. This should be possible, but I had the chance to use the idxx programs.

'Cookbook' for installation

# login as root

# make shure, iBCS2 is running, it is a loadable module
insmod /boot/iBCS

# add a group 'dba'
# add a user 'oracle7' belonging to group 'dba'

# mount CD

mkdir /cdrom
chmod 777 /cdrom
mount -t iso9660 -o ro /dev/cdrom /cdrom

# make executable executable

cd /cdrom/orainst
cp cd_link /usr/local/bin
chmod 555 /usr/local/bin/cd_link

# set environment and create directories

export ORACLE_HOME=/usr/local/oracle7
export ORACLE_SID=test
export ORACLE_TERM=vt100
export ORACLE_DOC=$ORACLE_HOME/oracle_doc
mkdir $ORACLE_HOME
mkdir $ORACLE_HOME/bin
mkdir $ORACLE_DOC                       # later required in installer
mkdir $ORACLE_HOME/stage        # required by 'start.sh'

# start installation

bash start.sh
# enter '/usr/local/oracle7/stage' as your oracle_link directory
# ... oracle makes links to whole cd and copies orainst/ dir
chown -R oracle7.dba $ORACLE_HOME
cd $ORACLE_HOME/stage/orainst
# make binaries executable

chmod 755 b10run b10runm cd_link oiuncomp opendev orainst.cm
# make scripts executable

chmod 755 crrtsh.sh oitape oradoc oradocm orafiles orainst rootpre.sh rthd.sh start.sh
# make GNU 'make' available for ORACLE
# we don't need to compile the GNU make, delivered with the ORACLE
# software, as Linux has one by default

ln -s /usr/bin/make $ORACLE_HOME/bin/make
# create a dummy /usr/lbin dir

ln -s /usr/local/bin /usr/lbin

# install SCO utilities required for 'orainst'
cd $ORACLE_HOME
mkdir SCO
cd SCO
mkdir bin
mkdir lib
cd bin

cp ???/idar .   # archiver
cp ???/idas .   # assembler
cp ???/idld .   # linker

cd ../lib
cp ???/idcomp . # compiler
cp ???/idcpp . # preprocessor
cd ..
chmod -R a+x *

# link them to where orainst expects them
cd /bin

ln -s /usr/local/oracle7/SCO/bin/idar
ln -s /usr/local/oracle7/SCO/bin/idas
ln -s /usr/local/oracle7/SCO/bin/idld

cd /lib
ln -s /usr/local/oracle7/SCO/lib/idcomp
ln -s /usr/local/oracle7/SCO/lib/idcpp

# install the installer

cd $ORACLE_HOME
mkdir newoi
cp stage/orainst/* newoi
chown -R oracle7.dba newoi
cd newoi
orainst
# answer all questions, ignore hint to run 'rootpre.sh' for now,
# select 'Install/Upgrade/Patch Software Only',
# then 'Install from Permanent Staging Area' and select
# $ORACLE_HOME/stage as the permanent staging area,
# select only the installer to install. When done, exit the
# installer in newoi with C-x.

cd $ORACLE_HOME/orainst
# Look into $ORACLE_HOME/orainst/install.log for any errors.
# Move 'install.log' anywhere.
# Some files here have now root owner and are later used by oracle7, so
chown oracle7.dba *
# remove temporary directory

cd $ORACLE_HOME
rm -r newoi

cd orainst
# prepare some files; do not install SCO icons, no floppy install
rootpre.sh

# correct permission problems of ORACLE CD
rm $ORACLE_HOME/stage/rdbms/install/dbsup.sh cp /cdrom/rdbms/install/dbsup.sh $ORACLE_HOME/stage/rdbms/install/dbsup.sh chmod 755 $ORACLE_HOME/stage/rdbms/install/dbsup.sh chown oracle7.dba $ORACLE_HOME/stage/rdbms/install/dbsup.sh

# change header file temporarily

cp /usr/include/asm/types.h /usr/include/asm/types.h.ORG
# now edit /usr/include/asm/types.h:
# comment out this lines:
# /*typedef __signed__ char __s8;*/
# /*typedef __signed__ short __s16;*/
# /*typedef __signed__ long __s32;*/
# /*typedef __signed__ long long __s64;*/

# logoff and login as oracle7

export ORACLE_HOME=/usr/local/oracle7
export ORACLE_SID=test
export ORACLE_TERM=vt100
export ORACLE_DOC=$ORACLE_HOME/oracle_doc
export _ORCA_DEBUG=1          # if you want to see some internals
PATH=$ORACLE_HOME/bin:$PATH # $ORACLE_HOME/bin MUST be first cd $ORACLE_HOME/orainst

# now install the wanted executables

orainst

# again select 'Install/Upgrade/Patch Software Only',
# then 'Install from Permanent Staging Area'
# and then 'ORACLE7 Distributed Database option 7.0.16'
# plus 'ORACLE7 Procedural Option (PL/SQL V2) 2.0.'
# plus 'ORACLE7 Server (RDBMS) 7.0.16.4.0'
# optionally you may select i.e. SQL*Plus, SQL*Net TCP/IP V1 and/or V2
# answer other questions, don't require relinking,
# say yes to 'Would you like to install TCP/IP Protocol Adapter (V2)?'.
# The installation now should take place without any serious error.
# Examine $ORACLE_HOME/orainst/install.log again
# (ignore install.log error '/usr/local/oracle7/bin/gennttab: [:
# too many arguments')

#

# Now you are ready to create a database. Leave the installer,
# move install.log elsewhere and restart the installer again with

orainst

# After the initial questions select 'Create New Database Objects',
# enter/confirm the System Identifier (ORACLE_SID) and you will
# (surprisingly for normal, not ORACLE proven people) again see
# the main window with 'available products' and 'installed products'.
# Select the point 'ORACLE7 Server (RDBMS) 7.0.16.4.0' and install.
# You are asked for some passwords and names/sizes of database
# files. Accept them for a first test, and then the creation of the
# database is done. You may want to have a second window open
# with a 'cd $ORACLE_HOME/orainst; tail -f install.log' to see,
# what's going on, but don't be surprised to find about 235 SQL
# errors, when the data dictionary is created. The scripts always
# do something like: 'drop table ...; create table ...' to be shure,
# the table can successfully be created, but the drop gives an error,
# because on an initial run the table does not exist.
# After the installer tells you about success and leaving the installer,
# you may check the log with:

grep ORA- install.log|grep -v ORA-00942|grep -v ORA-01432|grep -v ORA-01434
# you then should get this list of SQL errors:

ORA-04043: object DBMS_STANDARD does not exist
ORA-04043: object PIDL does not exist
ORA-04043: object PIDL does not exist
ORA-04043: object DIANA does not exist
ORA-04043: object DIANA does not exist
ORA-04043: object DIUTIL does not exist
ORA-04043: object DIUTIL does not exist
ORA-04043: object PSTUBT does not exist
ORA-04043: object PSTUB does not exist
ORA-04043: object SUBPTXT2 does not exist
ORA-04043: object SUBPTXT does not exist
ORA-04043: object DBMS_SNAPSHOT does not exist
ORA-02289: sequence does not exist
ORA-04043: object DBMS_LOCK does not exist
ORA-04043: object DBMS_PIPE does not exist

# I did not check, if this are serious errors until now, because
# the statements, that cause this errors are not echoed by the scripts,
# but I'm quite sure, they are expected errors of the same sort as above
# YOUR DATABASE SHOULD NOW BE UP AND RUNNING!
# Check with

ps -a
# you should see this 5 processes
 9363 v02 S     0:00 ora_pmon_test
 9364 v02 S     0:00 ora_dbwr_test
 9365 v02 S     0:00 ora_lgwr_test
 9366 v02 S     0:09 ora_smon_test
 9367 v02 S     0:00 ora_reco_test

# Check access to the database with:

sqldba mode=line
SQLDBA> connect system
# give in the password, when asked

SQLDBA> select * from cat;
# you should see about 60 names of tables, views and synonyms.
# Try to shut down the database (as user oracle7):
SQLDBA> connect internal
SQLDBA> shutdown
# after a while you should see 3 messages:
Database closed.
Database dismounted.
ORACLE instance shut down.
# start it up again:

SQLDBA> startup
# after a while you should see messages similar to this:
ORACLE instance started.
Database mounted.
Database opened.
Total System Global Area       4448020 bytes
              Fixed Size         40100 bytes
           Variable Size       3990128 bytes
        Database Buffers        409600 bytes
            Redo Buffers          8192 bytes

# leave SQLDBA:

SQLDBA> exit

# as root, run $ORACLE_HOME/orainst/root.sh
cd $ORACLE_HOME/orainst
export ORACLE_SERVER=T # to get entries in /etc/services root.sh

# as root, clean up
# change modified system files back to original
cp /usr/include/asm/types.h.ORG /usr/include/asm/types.h
# remove executables only required for installation
rm /usr/local/bin/cd_link
cd /
rm bin/idar bin/idas bin/idld lib/idcomp lib/idcpp cd $ORACLE_HOME
rm -r SCO

# If the default sizes of the database are not, what you wanted,
# you find 2 scripts in $ORACLE_HOME/dbs: crdbtest.sql crdb2test.sql
# Feel free to modify the statements in it, shut down the database,
# remove all files in $ORACLE_HOME/dbs named '*test.dbf' and '*test.ctl',
# in 'crdb2test.sql' uncomment this lines:
# #set termout on
# #set echo on
# #spool crdb2test.lst
# then execute the scripts with SQLDBA

SQLDBA> connect internal
SQLDBA> @crdbtest.sql
SQLDBA> @crdb2test.sql

# to get a new database with your sizes created.


Georg Rehfeld <rehfeld_at_wmd.de>, June 1995

HERE'S HOW TO AVOID HAVING TO GET SCO BINARIES:

>David Mansfield <david_at_claremont.com>
>
>Here are some things to keep in mind:
>
>1) Make a user oracle7 before installing.  Give the user a >home dir where
>you want to install the system.
>
>2) export ORACLE_HOME = [oracle7's home dir] before starting. > The sysem has
>some trouble figuring this out for itself.  
 
>3) At the beginning of the install, the script ran df piped >thru sed to find
>out some disk space availabilities.  It somehow forgot that >the first line
>outputted by df has column headings, and therefore it was >trying to compare
>the *word* available (instead of the number beneath it on the >second line) to
>250000 or something like that.  I moved my df to df.real and >made a script 
>which just echo'ed a bogus line from df that said I had tons >of space. I >wasn't into debugging their scripts!!!  

>4) A note about replacing the binaries with scripts (like df >in #3). You must >have the "#! /bin/sh" thing at the top of the script or it >won't run.  

>5) Create a directories /var/opt/oracle and /usr/lbin before >starting.  I don't
>know what permissions (I used 777!!!) because at the very end >of the install
>it will bomb if you don't have 'em.  Very annoying.
 

>6) When you get the "can't execvp" message, just type the >command it couldn't >exec and you will be ok.  

>7) The most difficult part of this is getting the compiler >tools for SCO (or
>imitating them with the COFF-development tools that are in the >same place as
>iBCS) to work.  They are *usually* called id** and here's a >list of what I
>made:
>/lib/idcomp -> /bin/idcomp
>/lib/idcpp -> /usr/bin/cpp
>/bin/idar -> /usr/i486-sysv4/bin/ar  (from the coff dev. >tools)
>/bin/idas -> /usr/i486-sysv4/bin/as-coff (from the coff >dev.tools)
>/bin/idcomp  (a shell script - see below)
>/bin/idcpp -> /usr/bin/cpp
>/bin/idld -> /usr/i486-sysv4/bin/ld (from the coff dev. tools)
 
>8)  There is a reason why idcomp is not simply a link to gcc. > After realizing
>that I would need idas to compile a coff .o file, I set out to >make a .s 
>(assembly file) that it could handle.  My first attempts were >completely 
>fruitless.  It wouldn't even handle the .s files that gcc >produced.  I 
>tried uploading the .c file to a different machine with an >older gcc and
>compiling, and that would assemble, but it was compiled for a >SPARC processor
>so the definition of a WORD vs a LONG were different.  In >addition, gcc
>placed underscores before the symbols in a way that oracle >wasn't expecting
>and the objects weren't found in the libraries.  Eventually, I >realized that
>if I gave gcc the -b i486-linuxaout flag, it would make .s >files usable by
>as-coff.  I also made a perl script to strip out extra >underscores to make
>the symbols correct.  So....  Here's my idcomp script:
>----------------------------------------------
>#! /bin/sh
>
>gcc -b i486-linuxaout -S -o mytemp.s $2
>no_under.pl > $4
>
>----------------------------------------------
>And here's the perl script, no_under.pl:
>----------------------------------------------
>#! /usr/bin/perl
>
>open(MYTMP,"mytemp.s");
>
>while (<MYTMP>) {
>  @TMP = split (/[\s+\t]/,$_);
>  foreach $word (@TMP){
>  $word =~ s/^_//;

> print $word, " ";
> }
 print "\n";
>}
>----------------------------------------------
>Believe it or not, idcomp and idas will produce a coff .o file >with the
>correct symbols (assuming it's executable :-). 
 
>You may want to test this on a .c file of your own.  Run >"file" against the
>resulting .o file, and you should see some nice results.  By >the way,
>idcomp expects to be called with parameters a la oracle >install scripts, which
> means the file to compile is the second parameter and the >output file is the >fourth parameter.  

>I think this is all, but if you run into problems, drop me a >line.  

>David Mansfield
>david_at_claremont.com

IAP Received on Wed Jul 24 1996 - 01:47:00 CDT

Original text of this message

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