The setup of Oracle is quite difficult. Do not try to install Oracle unless you really have to use it. Solid is much simpler to install and maintain. The best comparison is that Solid is a 2MB download, compared to 140MB for Oracle. This difficulty factor of 70 holds true throughout the installation of Oracle.
These instructions should allow you to get Oracle running in a couple of hours (after you have downloaded the beast). Using the Oracle docs and some other internet resources it took me a week to get this far...
cat 805ship*.tar | tar -zx
/usr/installs/databases/ora805/unixdoc/index.htm
If you have source code installed you can go to /usr/src/linux and then run
cd /usr/src/linux grep SHMMAX `find . -name *.h`to find the relevant lines in the include files (note the backquotes).
Breathe a sigh of relief as you realise that the default linux parameters are probably good enough for now.
First create a new directory /u01. We are already working as root at this time.
cd / mkdir u01 chown oracle u01 chgrp dba u01
Now we must mount a hard disk partition under this directory. I did this using the graphical tools. This mount is now an automatic part of your system configuration.
If you already have enough space somewhere else, hundreds of megabytes, then you can just create a symbolic link for /u01 to that space.
ORACLE_OWNER=oracle export ORACLE_OWNER
Now run the script. It is OK to continue since ORACLE_OWNER is set.
cd /usr/installs/databases/ora805/orainst oratab.sh
su oracle
umask
If it is not correct then you need to add a line to your .bash_profile
umask 022
# oracle parameters ORACLE_BASE=/u01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/8.0.5 LD_LIBRARY_PATH=$ORACLE_HOME/lib ORACLE_SID=main ORACLE_TERM=386 PATH=$PATH:$ORACLE_HOME/bin TMPDIR=/var/tmp export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH ORACLE_SID ORACLE_TERM PATH TMPDIR umask 022
Check these parameters twice before relying on them. I set export for LD_LIBRARY not LD_LIBRARY_PATH and wasted hours looking for the subsequent linking problem.
If you have AOLserver started automatically by init then you may like to add the definition of these parameters to that script. Alternatively you can create a wrapper for the AOLserver program (nsd) which sets these variables.
mpgorkom wrote to tell me that if you add the lines below to the .bash_profile you can avoid the whole installation error we work through later on. I haven't personally tested his solution:
ORACLE_DOC=$ORACLE_BASE/doc export ORACLE_DOC
cd /usr/installs/databases/ora805/orainst orainst
ORACLE_BASE: /u01/app/oracle ORACLE_HOME: /u01/app/oracle/product/8.0.5
/usr/installs/databases/ora805
I selected the following for installation, you should probably do the same. Maniacs who want to install more options can always do so later on. Let's get something working first...
Client Software 8.0.5.0.0 Oracle8 Server, Release 8.0.5 Documentation 8.0.5.0 Oracle8 Standard (RDBMS) 8.0.5.0.0 PL/SQL 8.0.5.0.0 SQL*Plus 8.0.5.0.0
Note that there is a problem with the installation of the documentation. It will cause the installation to bark at us later on. If you like to play safety first then you probably shouldn't install the documentation right now. Otherwise I have included a work around later in this document.
/u01/app/oracle/doc
A write error occurred while trying to copy '/usr/installs/databases/ora805/unixdoc/server.805/install/lnx_server.805 to '/u01/app/oracle/product/8.0.5/doc/server.805/install/lnx_server.805 (No such file or directory.)
If we take a look ourselves we can see that the /u01/app/oracle/product/8.0.5/doc directory is empty! Log in to another xterm as the oracle user and help out by creating the directories.
cd /u01/app/oracle/product/8.0.5/doc mkdir server.805 cd server.805 mkdir install
Now hit Retry on the installation. It should continue as normal.
Result: Success
cd /u01/app/oracle/product/8.0.5/orainst sh root.sh
# # oracle # ORACLE_BASE=/u01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/8.0.5 LD_LIBRARY_PATH=$ORACLE_HOME/lib ORACLE_SID=main ORACLE_TERM=386 PATH=$PATH:$ORACLE_HOME/bin TMPDIR=/var/tmp export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH ORACLE_SID ORACLE_TERM PATH TMPDIR ORAENV_ASK=NO . /usr/local/bin/oraenv
The oraenv program is a simple way to set up the same environment for all oracle users if you have this setup information scattered in all of their respective .profile's.
ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/8.0.5 ORACLE_SID= main
/usr/local/bin
cd .. cd rdbms/admin sqlplus
SQL*Plus: Release 8.0.5.0.0 - Production on Wed Mar 10 16:14:0 1999 (c) Copyright 1998 Oracle Corporation. All rights reserved. Enter user-name: sys Enter password: Connected to: Oracle8 Release 8.0.5.0.0 - Production PL/SQL Release 8.0.5.0.0 - Production SQL> help topics ----- long list of help topics will be printed SQL> @catrep.sql ----- long list of status messages, don't worry about the errors Commit complete. SQL> exit Disconnected from Oracle8 Release 8.0.5.0.0 - Production PL/SQL Release 8.0.5.0.0 - Production
# # This file is used by ORACLE utilities. It is created by root.sh # and updated by the Oracle8 and SQL*Net install procedures. # # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field indicates # to the dbstart utility that the database should, "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # main:/u01/app/oracle/product/8.0.5:N
svrmgrl
Oracle Server Manager Release 3.0.5.0.0 - Production (c) Copyright 1997, Oracle Corporation. All Rights Reserved. Oracle8 Release 8.0.5.0.0 - Production PL/SQL Release 8.0.5.0.0 - Production SVRMGR> help The following are SIMPLIFIED syntax descriptions. For complete syntax descriptions, please refer to the Oracle Server Manager User's Guide. STARTUP [DBA] [FORCE] [PFILE=filespec] [EXCLUSIVE | SHARED] [MOUNT dbname | OPEN dbname] [NOMOUNT] SHUTDOWN [NORMAL | IMMEDIATE | ABORT] MONITOR For graphical modes only, bring up a monitor ARCHIVE LOG [START] [STOP] [LIST] [NEXT] [<n>] [ALL] ['destination'] RECOVER { [DATABASE [MANUAL] ] | [TABLESPACE ts-name [,tsname]] } CONNECT [username [/password] ] [INTERNAL] ['@'instance-spec] DISCONNECT SET options: INSTANCE, ECHO, TERMOUT, TIMING, NUMWIDTH, CHARWIDTH SHOW LONGWIDTH, DATEWIDTH, AUTOPRINT and for SHOW: ALL, SPOOL EXIT REM SQL statements can also be executed. SVRMGR> connect internal Connected. SVRMGR> shutdown Database closed. Database dismounted. ORACLE instance shut down. SVRMGR> exit Server Manager complete.
svrmgrl
Oracle Server Manager Release 3.0.5.0.0 - Production (c) Copyright 1997, Oracle Corporation. All Rights Reserved. Oracle8 Release 8.0.5.0.0 - Production PL/SQL Release 8.0.5.0.0 - Production SVRMGR> connect internal Connected. SVRMGR> startup ORACLE instance started. Total System Global Area 4754704 bytes Fixed Size 48400 bytes Variable Size 4222976 bytes Database Buffers 409600 bytes Redo Buffers 73728 bytes Database mounted. Database opened. SVRMGR> exit Server Manager complete.
sqlplus
SQL*Plus: Release 8.0.5.0.0 - Production on Wed Mar 10 17:33:48 1999 (c) Copyright 1998 Oracle Corporation. All rights reserved. Enter user-name: scott Enter password: tiger Connected to: Oracle8 Release 8.0.5.0.0 - Production PL/SQL Release 8.0.5.0.0 - Production SQL> select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM ---------- ---------- --------- ---------- --------- ---------- ---------- DEPTNO ---------- 7369 SMITH CLERK 7902 17-DEC-80 800 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 EMPNO ENAME JOB MGR HIREDATE SAL COMM ---------- ---------- --------- ---------- --------- ---------- ---------- DEPTNO ---------- 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 EMPNO ENAME JOB MGR HIREDATE SAL COMM ---------- ---------- --------- ---------- --------- ---------- ---------- DEPTNO ---------- 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 7788 SCOTT ANALYST 7566 09-DEC-82 3000 20 7839 KING PRESIDENT 17-NOV-81 5000 10 EMPNO ENAME JOB MGR HIREDATE SAL COMM ---------- ---------- --------- ---------- --------- ---------- ---------- DEPTNO ---------- 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7876 ADAMS CLERK 7788 12-JAN-83 1100 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 EMPNO ENAME JOB MGR HIREDATE SAL COMM ---------- ---------- --------- ---------- --------- ---------- ---------- DEPTNO ---------- 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7934 MILLER CLERK 7782 23-JAN-82 1300 10 14 rows selected. SQL> exit Disconnected from Oracle8 Release 8.0.5.0.0 - Production PL/SQL Release 8.0.5.0.0 - Production
Congratulations! You have a working Oracle installation.
su
cd /etc/rc.d/init.d
#!/bin/sh # # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network ORA_HOME=/u01/app/oracle/product/8.0.5 ORA_OWNER=oracle if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]; then echo "Oracle startup: cannot start" exit fi # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting Oracle: " su - $ORA_OWNER -c $ORA_HOME/bin/dbstart & echo touch /var/lock/subsys/dbora ;; stop) # Stop daemons. echo -n "Shutting down Oracle: " su - $ORA_OWNER -c $ORA_HOME/bin/dbshut echo rm -f /var/lock/subsys/dbora ;; restart) $0 stop $0 start ;; status) ;; *) echo "Usage: dbora {start|stop|restart|status}" exit 1 esac exit 0
chmod 755 dbora
The link has a S (start) or K (kill) as its first letter. The next 2 characters in the name are a number which is used to determine the order in which the services are started and shut down. Oracle should be one of the last things started (high number eg: 95) and one of the first things shut down (low number eg: 12).
cd .. cd rc3.d ln -s ../init.d/dbora S95dbora
cd .. cd rc0.d ln -s ../init.d/dbora K12dbora cd rc1.d ln -s ../init.d/dbora K12dbora cd rc6.d ln -s ../init.d/dbora K12dbora