Oracle8i Installation Guide
Release 8.1.5 for Intel Linux

A74958-01

Library

Product

Contents

Index

Prev Next

4
Configuring Oracle8i

You must perform certain post-installation steps and configure Oracle8i after completing the OUI session. This chapter describes the required steps, as well as some optional ones.

Configuration Tasks to Perform as the root User

Log in as the root user and perform the following tasks:

Run the root.sh Script
Create Additional Linux Accounts
Verify Database File Security (Optional)
Automate Database Startup and Shutdown (Optional)

Run the root.sh Script

The OUI creates the root.sh script in the ORACLE_HOME directory and prompts you to run the root.sh script. Log in as the root user and run the script to set the necessary file permissions for Oracle products, and perform other root-related configuration activities:

# cd $ORACLE_HOME
# ./root.sh

The root.sh script prompts you to confirm the environment before it performs any actions. If you need to reset the environment for any reason, terminate the root.sh script. If you terminate the script, you must re-run it. You do not need to run the OUI again. Select the [OK] button after root.sh runs successfully to continue the installation. Select the [OK] button on the OUI screen after the root.sh script runs successfully to continue the installation.

Depending on the products you installed, messages are displayed to inform you of the progress of root.sh. You might also be prompted for user names and be given additional instructions.

You will be asked by the root.sh script to specify the local bin directory. If this directory does not already exist, root.sh creates it for you.

Create Additional Linux Accounts

If necessary, create additional Linux accounts with your system administration utility (useradd). Each DBA on the system must have an account in the OSDBA group.

Verify Database File Security (Optional)

Sites using Oracle8i configured in a way similar to a United States NCSC C2 or European ITSEC E3 security evaluation configuration must perform this task to ensure the integrity of the Oracle software installation. This task is optional if security is not an issue.

Query the data dictionary view using SQL*Plus to list the accounts in the default database. Accounts in the database are based upon the products chosen in the OUI.

sql> SELECT username from dba_users;

You should delete accounts that you do not need.

Many files must be protected to prevent unauthorized access to secure data. The recommended file modes and ownership are as follows:

Table 4-1 summarizes the directory and file permissions for different types of files. Note that these permissions are the default values and should not be changed.

Table 4-1 Access Permissions on Oracle Directories and Files
Directories/Files   Permissions   Comments  

All database, redo log, and control files (extensions for these files are typically .dbf, .log, and .ctl).

 

640

rw-r----

 

To maintain discretionary access to data, all databases, redo logs, and control files must be readable only by the oracle account and OSDBA group.

 

$ORACLE_HOME/bin/

 

751

rwxr-x--x

 

Must be writable by the oracle software owner, and executable by all users.

 

The oracle executable, and the following network executables: cmctl, cmadmin, cmgw, names, namesctl, tnsping, osslogin, trcroute, trcasst, onrsd, oemevent, oratclsh, dbsnmp, lsnrctl, and tnslsnr.

 

6751

rws-r-s--x

 

The 6 sets the setuid bit so the executables run as the oracle user and dba group, regardless of who executes them.

 

All other executables.

 

751

rwxr-x--x

 

Must be writable by the oracle software owner, and executable by all users.

 

$ORACLE_HOME/lib/

 

755

rwxr-xr-x

 

The directory is readable, writable, and executable by the owner, readable and executable by all other users.

 

All files under $ORACLE_HOME/
lib/

 

644

rw-r--r--

 

The files are readable and writable by the owner, read-only for all other users.

 

$ORACLE_HOME/rdbms/log

 

751

rwxr-x--x

 

Restricts access to log files to the oracle account and OSDBA group.

 

Product subdirectories such as $ORACLE_HOME/sqlplus or $ORACLE_HOME/rdbms

 

751

rwxr-x--x

 

Restricts access to log files to the oracle account and OSDBA group.

 

Files in $ORACLE_HOME/
sqlplus
or $ORACLE_HOME/
rdbms

 

644

rw-r--r--

 

The files are readable and writable by the owner, read-only for all other users.

 

$ORACLE_HOME/
network/trace

 

777 or 730

rwxrwxrwx

or

rwx-wx---

 

777 allows broad access to view and create trace files during development. Use 730 in a production environment to ensure that only members of the OSDBA group have access to trace files.

 

All files under product admin directories, like $ORACLE_HOME/
rdbms/admin
and $ORACLE_HOME/sqlplus/admin

 

644

-rw-r--r--

 

SQL scripts should typically be run as the SYS user.

 

Automate Database Startup and Shutdown (Optional)

Automating database startup is optional, but automatic shutdown is recommended, because it guards against improper shutdown of the database.

The dbshut and dbstart scripts are located in the $ORACLE_HOME/bin directory, and can be used to automate database startup and shutdown.

The dbstart and dbshut scripts reference the same entries in the oratab file, so the scripts must apply to the same set of databases. For example, you cannot have dbstart automatically start up databases sid1, sid2, and sid3, and dbshut shut down only databases sid1 and sid2. You can, however, specify that dbshut shut down a set of databases while dbstart is not used at all. To do this, include the dbshut entry in the shutdown file but omit the dbstart entry from the system startup files.

See Also:

Check the documentation for the init command in your Intel-Linux documentation for a description of system startup and shutdown procedures.

 

Automating Database Startup and Shutdown

This process must be completed for every new database that you want to have automated startup and shutdown. To set up the dbstart and dbshut scripts so that they are called at system startup, use the following procedure:

  1. Edit the /etc/oratab file.

Database entries in the oratab file appear in the following format:

ORACLE_SID:ORACLE_HOME:{Y|N}

where Y or N specifies whether you want the dbstart and dbshut scripts to start up and shut down the database.

  1. Find the entries for all the databases that you want to start up. They are identified by the sid in the first field. Change the last field for each to Y.
  2. Create a file named dbora in the /etc/init.d directory (if it does not already exist).
  3. Create entries similar to the following at the end of the dbora file (if they do not already exist). Be sure to give the full path of the dbstart utility.
    #!/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=/u01/app/oracle/product/8.1.5
    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 &
    ;;
    '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/dbshut &
    ;;
    esac
  4. Link dbora by entering:
    # ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
    # ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora      
    

Configuration Tasks to Perform as the oracle User

Perform the following tasks as the oracle user.

Update Linux Account Startup Files
Update the oratab File
Apply Any Required Oracle Patches
Set Initialization Parameters

Update Linux Account Startup Files

Update the startup files of the oracle account and the Linux accounts of Oracle users.

Set Environment Variables

Set the following environment variables in the .profile or .login file of the oracle account before using Oracle8i products. Table 4-2 shows the OUI default values (which you might have modified). The syntax for setting environment variables is as follows:

For the Bourne or Korn shell:

variable_name=value; export variable_name

For the C shell:

setenv variable_name value  



Note:

You should not define environment variables with names that are identical to those used for Oracle processes, for example: CKPT, PMON, and DBWR.

 

CLASSPATH

The classpath is used for Java functionality. CLASSPATH is different for various products. Refer to your product documentation for more information.

LD_LIBRARY_PATH

Required when using Oracle products that use shared libraries. Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib.

ORACLE_BASE

Specifies the directory at the top of the Oracle software and administrative file structure. The OFA-recommended value is software_mount_point/app/oracle. For example: /u01/app/oracle.

ORACLE_HOME

Specifies the directory containing the Oracle software for a given release. The OFA-recommended value is $ORACLE_BASE/product/release. For example: /u01/app/oracle/product/8.1.5.

ORACLE_SID

Specifies the Oracle system identifier, or sid, which is the name of the Oracle Server instance. Because the sid is incorporated into many filenames, Oracle Corporation recommends restricting it to no more than four characters to avoid filename problems on heterogeneous systems.

PATH

Verify that the search path includes all of the following:

Initialize the oraenv (coraenv) Script

You have option of using the oraenv or coraenv scripts to set a common environment for Oracle users. Follow the instructions below for a single-instance or multiple-instance configuration for the oraenv script, or the coraenv script if you are running the C shell.

Single-Instance Machine

On a single-instance machine, include the following commands to initialize the oraenv (coraenv) file at the end of the .profile or .login file of the oracle account.

For the Bourne or Korn shell:

ORAENV_ASK=NO
. /usr/bin/oraenv

For the C shell:

set ORAENV_ASK = NO
source /usr/bin/coraenv
unset ORAENV_ASK
Multiple-Instance Machine

On a multiple-instance machine, include a list of instance names and the commands necessary to initialize the oraenv (coraenv) file at the end of the startup file of the oracle account. The value of ORACLE_SID you defined before the OUI session is the default instance name.

For the Bourne or Korn shell:

#!/bin/sh
SIDLIST=\Qawk -F: '/^[^#]/{printf "%s",$1} '/etc/oratab\Q
echo "SIDs on this machine are $SIDLIST"
ORAENV_ASK=
. /usr/bin/oraenv

For the C shell:

set sidlist=\Qawk -F: '/^[^#]/{printf"%s",$1} '/etc/oratab\Q
echo "SIDs on this machine are $sidlist"
unset ORAENV_ASK sidlist
source /usr/bin/coraenv

Update Other Oracle User Startup Files

To create the same environment for all Oracle users, update each user startup file to include the following:

(or source /usr/bin/coraenv for C shell users)

Update the oratab File

If you have created a database manually instead of using the Database Configuration Assistant (DBCA), you must ensure the system configuration is reflected in the /etc/oratab file.

Add an entry for each server instance on the system in the following format:

ORACLE_SID:ORACLE_HOME:{Y|N}

where Y or N indicates whether you want to activate the dbstart and dbshut scripts. The DBCA automatically adds an entry for each database it creates.

Apply Any Required Oracle Patches

The Oracle8i release which this manual accompanies includes patches that must be applied to Oracle8i or other products. Patches can be found on the Product CD-ROM in the /cd_rom_mount_point/patch directory. Review the README file included with each patch for installation instructions.

Set Initialization Parameters

The default initsid.ora file shipped with the distribution is located in the $ORACLE_BASE/admin/sid/pfile directory. A template initsid.ora file is also included in the $ORACLE_HOME/dbs directory. The file contains settings for small, medium, and large databases, with the settings for medium and large databases commented out. The size settings are relative to each other, but do not represent an empirical size of the database.

Modify initsid.ora Parameters

When you create a database using DBCA your initsid.ora parameters are automatically set. You can manually modify the initialization parameters in the initsid.ora file with a Linux text editor. Activate the modified initsid.ora file by shutting down and restarting the database.

Do not use symbolic character representations such as question marks (?) for ORACLE_HOME in parameter files.

To bring rollback segments online automatically with database startup, you must uncomment the rollback_segments lines in the initsid.ora file.

For example, change:

#rollback_segments = (r0, r1, r2, r3)

to:

rollback_segments = (r0, r1, r2, r3)


See Also:

Oracle8i Administer's Reference for Intel-Linux for information on initsid.ora parameters.

 

Post-Installation for Oracle Products

Perform the product-specific steps listed in this section as necessary for your installation. Not all products require post-installation setup.

To access online documentation before you configure your Oracle installation, see the instructions for accessing that documentation. It is not necessary to read product documentation before completing the configuration tasks in this manual, but more sophisticated tuning requires information in the product documentation.

The following products require post-installation steps:

Post-Installation for Oracle Options
Post-Installation Steps for Oracle8i Recovery Manager
Post-Installation Steps for Oracle Precompilers
Post-Installation Steps for Net8
Post-Installation Steps for Oracle Names Server (Optional)
Post-Installation Steps for Oracle Supported Protocols

Post-Installation for Oracle Options


Note:

There is no upgrade from previous releases of ConText Cartridge to Oracle interMedia 8.1. However, there is a migration that can be performed manually. See the Oracle8i interMedia Text Migration Guide for documentation of this process.

 

If you intend to install Oracle interMedia Text, ensure you have at least 10 MB of disk space for the data dictionary.

Verify that tablespaces exist to serve as default and temporary tablespaces for Oracle interMedia Text. Oracle interMedia Text uses the DRSYS tablespace for its default and temporary tablespaces. If tablespaces for Oracle interMedia Text do not exist or you do not want to use the DRSYS tablespace, create additional tablespaces before proceeding.

See Also:

Oracle8i SQL Reference for information on creating tablespaces.

 

  1. Start up the Database Configuration Assistant (DBCA) by executing dbassist, which is located in the following directory:
    $ORACLE_HOME/bin/dbassist
    
  1. Select [Modify Database].
  2. Select the appropriate database SID from the list of those detected by the DBCA. The database that you want to modify must already be running.
  3. Choose the options you wish to enable from the list and click the [Finish] button.

Execute privileges will be granted to PUBLIC for all of the options and packages.

Post-Installation Steps for Oracle8i Recovery Manager

Recovery Manager is an automated recovery utility that is installed as part of Oracle8i. It stores information in a recovery catalog in a separate Oracle8i database. This second Oracle8i database should be installed on a separate machine to provide maximum fault resistance.


Note:

Recovery Manager can also be used in a restricted mode without a recovery catalog, if the installation and maintenance of a second Oracle8i database is impractical.

 

Perform the following steps if you want to create a recovery catalog:

  1. Install Oracle8i on a separate machine from any other Oracle8i system and create a database for the recovery catalog.

If you choose not to write a custom script to create the database, create the default database with the OUI. The default database is adequate for the recovery catalog.

  1. Create a user in the recovery catalog database to be the RECOVERY_CATALOG_OWNER.
  2. As the RECOVERY_CATALOG_OWNER, run the createCatalog command at the Recovery Manger prompt.

Post-Installation Steps for Oracle Precompilers


Note:

You cannot use Oracle Precompilers independently of Oracle8i to convert embedded PL/SQL.

 

Pro*C/C++

The configuration files ottcfg.cfg and pcscfg.cfg in $ORACLE_HOME/precomp/admin must be customized for your environment before using Pro*C/C++. See your C compiler documentation to determine how to configure this file.

See Also:

The Programmer's Guide to the ProC/C++ Precompiler for further information on configuring the pcscfg.cfg file for your environment.

 

Post-Installation Steps for Net8

Configuring a complete Oracle network is beyond the scope of this manual, and is covered in detail in the Net8 Administrator's Guide. When the Net8 Server or Net8 Client is installed, the Net8 Configuration Assistant is automatically launched to complete initial configuration of Net8 as follows:

  1. If you are installing Oracle8i, the Net8 Assistant will automatically create a profile called sqlnet.ora and a listener called listener with a listening end point that is consistent with any protocol support selections you made. In most cases, this results in listening on protocol TCP/IP using port number 1521. In all but the most complicated environments this will be the only listener you will ever need to configure. The listener will be started automatically by the Net8 Configuration Assistant. If you wish to check the status of the listener following installation you can do so by using the command:
    $ lsnrctl status
    

If the listener is running, the output of the lsnrctl status command will be similar to the following:

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=PNPKEY))
STATUS of the LISTENER
------------------------
Alias                   listener
Version                 TNSLSNR for SVR4: Version 8.1.5.0.0 - Production
...

If the listener is not running, start it up:

$ lsnrctl start listener
  1. Log in as root and reserve a port for the Net8 listener by making the following entry in the /etc/services file:
    listener 1521/tcp         #Net8 listener
    

If you create a database using the Database Configuration Assistant during or after installation, it will automatically update the listener configuration with any necessary configuration information for this new database. This file can then be distributed to any client machines to connect to the Oracle8i database.

If you choose to complete a separate Oracle8i client install, the Net8 Configuration Assistant will automatically create a profile that is consistent with any selections you made during installation. The OUI will automatically run the Net8 Easy Configuration wizard which assists you in configuring a net service name in the Local Naming file located in the $ORACLE_HOME/network/admin directory of your client installation.

After installation is complete more detailed configuration can be accomplished using the Net8 Assistant by executing:

$ netasst

Net8 Easy Configuration is also available by executing:

$ netec





See Also:

For information on the use and configuration of Net8 please refer to the Net8 Administrator's Guide.

 

  1. After the Net8 Assistant creates the tnsnames.ora file, append its contents to existing tnsnames.ora files in the $ORACLE_HOME/network/admin directories of client machines.
  2. Install SQL*Plus on a client machine, then start SQL*Plus to test the connection to the Server:
    $ sqlplus username/password@service_name
    

At this point you have established network connectivity over TCP/IP. For more advanced network configuration, refer to the Net8 Administrator's Guide.

Post-Installation Steps for Oracle Names Server (Optional)

Oracle Names Server is installed automatically with Net8. If you want to configure your network to use Oracle Names Server, complete the following:

  1. Use the Net8 Assistant to create the Oracle Names configuration files sqlnet.ora and names.ora.
  1. If you are using well-known Names Servers, verify they are correctly aliased in the /etc/hosts file of all network nodes.
  2. If you are using your machine as the server, start the Names Server process:
$ namesctl startup
  1. Check the Names Server process:
$ namesctl status

Post-Installation Steps for Oracle Supported Protocols

All Supported Protocols

Perform the following steps after installing any protocol:

  1. Verify that you have created and installed the necessary configuration files for the network.
  1. To start the listener automatically when the machine is rebooted, log in as the root user and add a line similar to the following in the system startup file:
    su - oracle -c "lsnrctl start"
    

On Intel-Linux, the startup file is /etc/init.d/dbora.


Note:

This procedure fails if the TNS_ADMIN environment variable is not set in the.profile or.login file of the oracle account, or if listener.ora is not in one of the default locations (/var/opt/oracle or $ORACLE_HOME/network/admin).

 

  1. If you have a client/server configuration, you must set the TWO_TASK environment variable on the clients to point to the server. Set the TWO_TASK environment variable on the client machines to the service name for the server (available from the tnsnames.ora file).
  2. Start the listener process on the server:
    $ lsnrctl start
    
  3. Check the listener process:
    $ lsnrctl status
    
  4. As the oracle user, start SQL*Plus, then test the connection with a loopback:
    $ sqlplus username/password@service_name
    

Accessing Installed Documentation

Documentation is can be installed in HTML, or PDF (Adobe Portable Document Format, which requires Acrobat Reader), or both formats. Intel-Linux-specific documentation files are installed from the Oracle8i CD-ROM. Generic documentation files are installed from the Online Generic Documentation CD-ROM. The location of the documentation files is determined according to the following rules:

To access the documentation, open either the index.htm or products.htm file. The index.htm file requires a frames-enabled browser. The products.htm file does not a require a frames-enabled browser.

You can also access documentation directly from the CD-ROM.

See Also:

Information on accessing documentation directly from CD-ROM is contained in the CD-ROM insert.

 




Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index