post installation tasks to be performedPost-Installation
You will need to be root to perform these many of these post-installation steps, except where otherwise indicated.

Add user(s) to the dba group
Remember that the oracle user should only be used to install Oracle and to startup and shutdown the Oracle processes. It should not be used for database administration or other database use. For this reason you should add at least one other user to the dba group for database administration purposes. Be careful about who you choose to add, as all users in the dba group can login to Oracle as the internal user without needed to specify a password.

In this example I add the user crunge to the dba group.

# usermod -G dba crunge

Automate Database Startup and Shutdown
Automatic database startup and shutdown is determined in part by the file /etc/oratab. This file lists each ORACLE_SID and its accompanying ORACLE_HOME, along with an indicator as to whether the database can be automatically started up and shutdown.

Edit /etc/oratab. It should look similar to the following:

#

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# 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 filed 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.
#
#
ORCL:/opt/oracle/product/8.1.6:N

Change the last character of the last line to be a Y instead of a N.

Next you will need to create an initscript that will startup and shutdown Oracle when the system changes runlevels. To do this create a file named /etc/rc.d/init.d/dbora, and make it look similar to the following:

#!/bin/sh
# Set ORA_HOME to be equivalent to the ORACLE_HOME
# from which you wish to execute dbstart and
# dbshut
# set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME
ORA_HOME=/opt/oracle/product/8.1.6
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')

# Start the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values

su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
;;
'stop')

# Stop the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values

su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac

After creating the file, give it the appropriate execute permissions as follows:

# chmod 755 /etc/rc.d/init.d/dbora

Now create symlinks to dbora for the various runlevels by issuing the following commands:

# ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc0.d/K10dbora
# ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc6.d/K10dbora
# ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc2.d/S98dbora
# ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc3.d/S98dbora
# ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc5.d/S98dbora

That's it. The next time the system starts up or shuts down (or changes runlevels) Oracle will startup and shutdown accordingly.

Set Environment Variables
There are a few changes you need to make to the oracle user's environment variables. As the oracle user, edit the ~/.oracle816 file and make it look similar to this:

ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/product/8.1.6
ORACLE_SID=ORCL
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
ORAENV_ASK=NO
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH ORAENV_ASK
. /usr/local/bin/oraenv

Other oracle users (e.g., crunge) should create a ~/.oracle816 file that looks like that of the oracle user. They should also be sure to call it from their shell's profile script. Instructions for doing this were given earlier, under the Pre-Installation Tasks.

Net8 Configuration
As root, edit /etc/services and add the line

listener 1521/tcp # Net8 listener

This reserves TCP port 1521 for use by the Net8 TNS Listener.

Fix the dbstart script
The dbstart script that is called by the initscript to startup the Oracle server processes has a typographical error in it. To fix it, login as the as oracle user end edit the file $ORACLE_HOME/bin/dbstart. Go to line 64, which reads as follows:

/PL\/SQL (Release|Version)/ {substr($3,1,3) ;

Replace /PL\/SQL with /JServer so that the line looks like the following:

/JServer (Release|Version)/ {substr($3,1,3) ;

Starting the Oracle server processes and the TNS Listener
As root, issue the following command to start the Oracle server processes and the TNS Listener:

# /etc/rc.d/init.d/dbora start
#
LSNRCTL for Linux: Version 8.1.6.0.0 - Production on 20-AUG-2000 17:28:33

(c) Copyright 1998, 1999, Oracle Corporation. All rights reserved.

TNS-01106: Listener using listener name LISTENER has already been started
Database "ORCL" already started.

Database "ORCL" possibly left running when system went down (system crash?).
Notify Database Administrator.

SQL*Plus: Release 8.1.6.0.0 - Production on Sun Aug 20 17:28:35 2000

(c) Copyright 1999 Oracle Corporation. All rights reserved.

SQL> Connected.
SQL> ORACLE instance shut down.
SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.6.1.0 - Productio


th the Partitioning option
JServer Release 8.1.6.0.0 - Production

SQL*Plus: Release 8.1.6.0.0 - Production on Sun Aug 20 17:28:37 2000

(c) Copyright 1999 Oracle Corporation. All rights reserved.

SQL> Connected to an idle instance.
SQL> ORACLE instance started.

Total System Global Area 56012784 bytes
Fixed Size 69616 bytes
Variable Size 38993920 bytes
Database Buffers 16777216 bytes
Redo Buffers 172032 bytes
Database mounted.
Database opened.
SQL> Disconnected

Database "ORCL" warm started.

Confirm Database Operation
Use one of the users you modified above to use the Oracle database (e.g., crunge) to verify that the database is operational. Login as that user and issue the following command:

$ sqlplus scott/tiger

This starts SQL*Plus and logs you in as the user scott with the password tiger. At the SQL> prompt, issue the command select * from dept;. You should see the output shown below:

SQL*Plus: Release 8.1.6.0.0 - Production on Thu Jun 15 14:57:21 2000

(c) Copyright 1999 Oracle Corporation. All rights reserved.


Connected to:
Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production

SQL> select * from dept;

DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON

SQL>

Once returned to the SQL> prompt, enter exit to exit SQL*Plus:

SQL> exit
Disconnected from Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production

hope thsi helps