The Oracle on Linux-libc5-Systems-Installation-Guide (Oct 1998)
Oracle 8 for Linux is available a few months now and
its trial version is free available from http://www.oracle.com This document
describes the installation of Oracle 8 on a Linux libc5 system without
replacing your primary library with glibc2.0.7 or above. I wrote this document
because I use the a Linux Disribution which is still based on libc5 (SuSe)
and will not use libc6 until the next major release (as I read at their
website http://www.suse.de).
My System is a Linux 2.0.35, Suse 5.1 with gcc 2.7.2.1
installed. I tried to install Oracle 8 for testing and ran in deep trouble
during installation procedure since the Oracle Unix Installer relinks a
lot of files and I had to link them again using glibc since they depend
on it and call them resulted in a Segmentation fault after installation.
If you find any errors in this documents or got any ideas
or suggestions please send me a mail to hans@tm.informatik.uni-frankfurt.de
Also if it helps getting your oracle running, drop me a mail if you like
for me to know my work was of any use. :-)
COPYRIGHT NOTICE
The Oracle on Linux-libc5 Systems-Installation-Guide copyright
(c) 1998, Hans Matzen,Frankfurt/M, Germany This document may be reproduced
and distributed in whole or in part, in any medium, physical or electronic,
so long as this copyright notice is retained on all copies. Commercial
redistribution is allowed and encouraged; however the author would like
to be notified of such distributions. You may translate this HOWTO into
any language whatsoever provided that you leave this copyright statement
and disclaimer intact, and that you append a notice stating who translated
the document.
DISCLAIMER
While I have tried to include the most correct and up to date information
available to me, I cannot guarantee that usage of information in this document
does not result in loss of data or equipment. I provide NO WARRANTY about
the information in the HOWTO and I cannot be made liable for any consequences
resulting from using the information in this HOWTO.
Prerequesites:
The Oracle8 for Linux CD or the unpacked tar file from the
WWW
-
glibc2.0.7 (I use glibc2.0.7pre6)
-
glibc plugins crypt, localedate, linuxthreads (I use glibc-crypt-2.0.6,
glibc-linuxthreads-2.0.7pre6 and glibc-localedata-2.0.7pre3)
Pre-Installation:
Install glibc2-0-7 as root:
(The following installation instructions are taken from the
glibc2.0.7pre6 documentation, thanks to the gnu-people who wrote it)
-
unpack the glibc2.0.7 distribution and the corresponding
plugins to e.g. /usr/local/src/glibc2.0.7
-
cd /usr/local/src
-
tar xvzf glibc2.0.7pre6.tar.gz
-
cd glibc2.0.7pre6
-
tar xvzf ../glibc-crypt-2.0.6.tar.gz
-
tar xvzf ../glibc-linuxthreads-2.0.7pre6.tar.gz
-
tar xvzf ../glibc-localedata-2.0.7pre3.tar.gz
-
do a ./configure --prefix=/usr/local/glibc \
-
--enable-add-ons=linuxthreads,crypt,localedata
-
where /usr/local/glibc is the path where
you want your glibc2 installed
-
do a make this can take real long time (about 3 hours on
my pentium 200MHz)
-
do a make install
-
do a ln -s /usr/local/glibc/lib/ld-linux.so.2 /lib/ld-linux.so.2
-
edit your /etc/ld.so.conf file and add /usr/local/glibc/lib
to the list of the paths
-
do a ldconfig -v
-
do a cp -r /usr/lib/gcc-lib/i486-linux /usr/local/glibc
-
do a ln -s /usr/local/glibc/i486-linux \ /usr/lib/gcc-lib/i486-linuxglibc2
-
do a cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.1
-
edit the specs file and do the following
-
change /lib/ld-linux.so.1 to /lib/ld-linux.so.2.
-
remove all %{...:-lgmon} expressions from
the file
Adding a group and account for Oracle, add root to group
dba
-
add a group dba to your system since it does not exists yet
(addgroup dba)
-
add a user oracle to your system sinc it does not exists
(adduser oracle) for the following i will assume the home directory of
oracle is /home/oracle
-
add user root to group dba (usermod -G`groups`,dba dba) or
edit /etc/group
Helping "Oracle Unix Installer" to link with the right
libs:
(I know this is dirty but believe me I tried everything else)
IMPORTANT:
Don't forget to reverse this after you have finished
the Oracle Installation.
I suggest that after Installation move gcc to gcc.glibc2
and gcc.standard back to gcc doing a
mv /usr/bin/gcc
/usr/bin/gcc.glibc2
mv /usr/bin/gcc.standard
/usr/bin/gcc
So you can use your glibc2 installation for use with the
Oracle Precompilers if you want to.
-
move your normal gcc to gcc.standard
mv /usr/bin/gcc /usr/bin/gcc.standard
-
create a file called /usr/bin/gcc like:
-
#!/bin/bash
-
gcc -b i486-linuxglibc2
$@
-
change permissions
chmod 0755 gcc
Setting up the Oracle User:
-
Login as user oracle
-
Assuming you are using bash as the oracle users shell add
the following in the oracle users .profile file:
# set this to the homedirectory of user oracle
export ORACLE_BASE=/home/oracle/
# set this to ~oracle/product/<versionnumber>
export ORACLE_HOME=/home/oracle/product/8.0.5.
# set this to the planed name of your databse
export ORACLE_SID=ORA1
# this is for xterm use vt100 or vt220 for terminals
export ORACLE_TERM=386x
# this is for national language support
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
# setting up linking environment
# remember to change /usr/local/glibc to whereever your glibc
# installation resides
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/glibc/lib:$ORACLE_HOME/lib
export LIBRARY_PATH=/lib:/usr/lib:/usr/local/glibc/lib
# make sure evereything could be found
export PATH=/usr/local/glibc/bin:$ORACLE_HOME/bin:\ /bin:/usr/bin:/usr/local/bin
# make sure this is unset bevor installing
unset SRCHOME
# directory for temporary installation files
export TMPDIR=/tmp
# to get rid of that ULIMIT warning message but make
# sure you have about 300Megs of space left
export ULIMIT=1000000
You have to replace /home/oracle to whatever you made
oracle's home-directory and 8.0.5 with the version number of your oracle8
distribution
-
Mount your cdrom or unpack the zipped tar file (the
following assume the oracle distribution under under /cdrom)
Main Installation:
- Log on as oracle
- Change to the oracle install directory: cd /cdrom/orainst
- Start the oracle installer: ./orainst
Remember you can abort instalation by selecting Cancel,
you proceed selecting OK from dialogs
- You see the oracle installer, you can move with TAB
and the cursor keys, select/unselect is done by using the space-bar
-
Select Custom Install
-
Read the installer remarks
-
Read the release notes
-
Select Install, Upgrade, or De-Install Software
-
Select Install New Product - Create DB Objects
-
The next screen shows the ORACLE_HOME and ORACLE_BASE settings
verify they are correct
-
The next screen tells you where oracle installer will put
the various log files
-
Select Install from CD-ROM
-
Now enter the planed name of your database (the follwoing
assumes ORA1 for now)
-
Select the native language for your database (e.g. German)
-
You are now notified to which file oracle installer saves
postinstall tasks, you should remember this because you have to run this
manually after you finished Main Installation
-
You now proceed to the Package Selection dialog you see to
listboxes the left contains the packages you can install, the right the
packages that are installed (should be empty for clean installation)
-
Select the packages to install in the left box for a minimum
use I suggest:
Oracle8 Standard (RDBMS) 8.0.5.0.0
PL/SQL 8.0.5.0.0
SQL*Plus 8.0.5.0.0
Do not select
the Oracle Server Documentation, since the installation will fail
because of
different filenames in the distribution and the installation files
(maybe that
is different with other distributions, anyone know more details ?)
-
If you like it to be well informed go to the options dialog
and activate everything
-
Start the installation by selecting Install
-
Confirm installation by selecting yes
The follwing sections desribe the different Installation
Dialogs for various packages.
Database Installation Dialogs:
- DBA Group Dialog
Select dba if its not selected yet
- OSOPER Group Dialog
Normally let this be dba.
If you like a different one here is what Oracle say about
this parameter:
The OSOPER group grants restricted database privileges
(such as starting up and shutting down the database) to members of a group
other than the DBA group.
- Create DB Objects: Storage Type Dialog
Here you can decide wether to use raw device or files
for your database to be created
I always use Filesystem-Based Database because i haven't
enough raw devices left on my system and dont want to repartition my harddisk
:-))
(anyone could tell about the Raw Device-Based Database
installation ??)
- Create DB Objects (F/S): Control File Distribution
Dialog
Here you can choose, if you would like to split the DB
control files over three mount points. It might be safer to say yes here,
i always say no for the above reasons :-)
- Mount Point Locator Dialog
Just enter the path where your database should reside
remember user oracle must have write permission to the parent directory
of this path
- Character Set Dialog
Specify the Character Set you want tu use with your database.
Selecting Others... will allow to enter the name manually. For german use
WE8ISO8859P1.
- National Character Set Dialog
Specify the Character Set you want tu use with your database.
Selecting Others... will allow to enter the name manually.
For german use WE8ISO8859P1.
- SYSTEM Password Dialog
Type the password for the DB-User SYSTEM, retype it
- SYS Password Dialog
Type the password for the DB User SYS, retype it
- dba Password Dialog
If you want to set passwords for user dba and operator
say yes here otherwise say no
(since im lazy I say no)
- TNS Listener Password Dialog
Type the password for the TNS Listener, retype it
- Configure MTS and start SQL*Net listener? Dialog
If you would like listener to be started automatically
say yes, otherwise no
(Every time I tried yes I got an error which is caused
by a syntax error in the listener.ora file,
so I say no here and configure TNS-Listener afterwards)
- Create DB Objects(F/S): Control File Locator Dialog
You are asked if you would like to use the oracle installer
default choice for the filenames, saying yes is easy and quick saying no
allows you to change filenames.
- DB Defaults Dialog
You are showed the default settings and filenames for
the database. maybe you like to remember them.
- Default Database Dialog
If you do not like the proposed settings select no and
change the values accordingly, otherwise select yes
SQLPlus Installation Dialogs:
- Help Facility Dialog
Select yes if you want the help command to work under
sqlplus, otherwise say no here.
- Demo Tables
Say yes to load demo tables into your new database during
installation, otherwise say no.
Post-Installation-Tasks:
-
Log on as root
-
Execute the postinstallation file $ORACLE_HOME/orainst/root.sh
-
REMEMBER: move /usr/bin/gcc.standard to /usr/bin/gcc
Postinstall TNS-Listener:
-
Log on as oracle
-
Edit the listener.ora file under $ORACLE_HOME/network/admin
change (none) in the SID_LIST to the name of your database (ORA1)
Is this a bug in the Installation Routine or is it intentionally ?
-
Log on as root
-
Setting up the Oracle environment for user root e.g. do a
source ~oracle/.profile
-
Start the listener with $ORACLE_HOME/bin/lsnrctl start
-
Remember: you can get status information with $ORACLE_HOME/bin/lsnrctl
status you can stop the listener with $ORACLE_HOME/bin/lsnrctl stop
I know that there are various ways to do this.
If you want to suggest one of the others write it down
I will put it here.
Testing your Oracle Installation:
- Log on as oracle
- Start Oracle Server Manager: svrmgrl
Enter the following commands:
connect internal
connect as SYS
shutdown
shut down the database
startup
start the database again
disconnect
disconnect from database
exit
exit Server Manager
If there are no error messages you are able to start and
stop your database.
Remember: You have to shutdown the database before you
are shutting down your system.
- Start SQLPlus: sqlplus
- Connect as system, password as you typed it during
Main Installation.
- For example do a select * from sys.dba_users;
- exit
If there are no error messages it seems your database
is up and running.
Congratulations !!!!
What you maybe want to do
Starting and Shutting Oracle at System Boot/Shutdown
I suggest a script named oracle in /sbin/init.d (for
Suse) or where your system scripts are live (/etc/init.d for Debian) similiar
to the following:
#!/bin/sh
case "$1"
in
'start')
echo "Starting Oracle Database"
su - oracle -c dbstart
su - oracle -c "lsnrctl start" ;;
'stop')
echo "Stopping Oracle Database"
su - oracle -c dbshut
kill 'ps -ef | grep tnslsnr | grep -v grep |\ cut -c 9-14' ;;
*)
echo "Usage: /etc/init.d/$0 { start | stop }"
esac
REMEMBER: If you want to start more than one database
you have to change this.
The only one thats started is the one mentioned in ~oracle/.profile
To activate this feature link this script to the appropriate
runlevel directory. e.g:
ln -s ../init.d/oracle
/sbin/init.d/rc2.d/S99oracle
ln -s ../init.d/oracle
/sbin/init.d/rc0.d/K01oracle
will bring up oracle in runlevel 2.
Adding a user without database system privileges to the
database:
Start sqlplus and connect as system.
The following sql commands will add a user to your database:
create user
<username> identified by <password>
default tablespace
users temporary tablespace temp;
grant connect,
resource to <username>
Exit sqlplus
Start sqlplus and connect as <username>.
Everything should be allright.
--- THE END ---
last updated: 09.11.1998, HM