Re: LINUX featuring ORACLE 7

From: Georg Rehfeld <georg_at_deerwood.hanse.de>
Date: 1995/06/07
Message-ID: <1995Jun7.010708.16427_at_deerwood.hanse.de>


Hi,

from my mailbox I know, there is some interest, in how to install ORACLE 7 for SCO(tm) Unix on Linux. Below you will find a 'cookbook'.

As I was asked for license issues, I can tell: this work was done for one of our customers, who has the ORACLE license for SCO Unix and uses it on a SCO box. He was interested, if it in principal would be possible to reduce the overall cost of an ORACLE server by using Linux boxes instead of SCO systems. He (as we all) knows, that there would be no support from ORACLE to expect (until ORACLE hopefully will offer the product for Linux), he will decide of the risc, to use an unsupported database, after it is clear, that it would be technically possible to do so.

If one of you is willing to run ORACLE on Linux, s/he has to buy a license from ORACLE, and it is not free! Maybe, ORACLE does not like to have their product running on Linux at all? ORACLE people reading this, what's your opinion?

An additional note on licensing and copyrights: ORACLE felt free to enclose GNU make with their SCO distribution under the terms of the GNU GENERAL PUBLIC LICENSE, as a normal SCO Unix without C compiler has no make, and one is required by the installer. ORACLE followed the rules of the GNU GPL in most parts: the installer, as an interactive programm, greets you with a message, that GNU make is contained and the sources are available and modified by ORACLE (GPL 2c), modifications by ORACLE are marked in the sources (GPL 2a), but they seem to have overlooked GPL 2b:

    b) YOU MUST CAUSE ANY WORK THAT YOU DISTRIBUTE or publish, THAT in     whole or IN PART CONTAINS or is derived from THE PROGRAM or any     part thereof, TO BE LICENSED AS A WHOLE AT NO CHARGE TO ALL THIRD     PARTIES UNDER THE TERMS OF THIS LICENSE. (Uppercase by me, PROGRAM in this case is the GNU make). So what, the RDBMS itself is free anyway, because it is not possible to install it without using make, and more, ORACLE 'forgot' to include the sources for the RDBMS! :-) Ok, ok, I will not insist on the sources ...

Meanwhile I did some more testing, especially with the 'distributed option'; I accessed from the Linux box a database on one of our RS6000 systems by invoking

> sqlplus user_at_T:some.host.name:sid

and vice versa: it works. I created a database link on the Linux side to a database on the other host and joined a table here with a table there: it works.

Before deleting my ORACLE installation, I will do some more tests, especially I will do some performance checking and try to import an existing database from one of our projects. A test for robustness by doing many transactions constantly over some days will follow. I hope, ORACLE Corp. will give me a 90 day trial period, as they do with Personal Oracle for Windows/OS/2/Windows NT.

regards
Georg



Installation of ORACLE V 7.0.16.4.0 for SCO Unix on Linux V 1.2.1
  • Prerequisites Linux kernel you did'nt expect this!

make
  we have a GNU make with Linux

the 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

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, when installing

Main problems were:

  • 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 (?)
  • the installer does not catch all errors, especially when attempting to compile and link libraries. One must carefully examine the install.log .
  • 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> _at_crdbtest.sql
SQLDBA> _at_crdb2test.sql
# to get a new database with your sizes created.
-- 
 ___   ___
| + | |__ ' Georg Rehfeld,  D-20535 Hamburg, Jordanstr. 8,  [49] (40) 2518356
|_|_\ |___, georg_at_deerwood.hanse.de
Received on Wed Jun 07 1995 - 00:00:00 CEST

Original text of this message