Oracle8 Installation Guide
Release 8.0.4

Part Number A56097-01

Library

Product

Contents

Index

Prev Next

B
Basic UNIX for Installing Oracle8

This appendix is organized as follows:

Essential UNIX Concepts

Case Sensitivity

UNIX is case-sensitive and most UNIX commands are in lower case. This means, for example, Email.Log and email.log are two different files in UNIX. Therefore, you need to be careful when you name and retrieve files and directories.

Executable Scripts

To run any executable script, enter:

./script_name

For example, to run the root.sh script, the command is:

./root.sh

Wildcard Characters

UNIX provides several special characters, called wildcards, to make it easier to specify multiple filenames and filetypes. The `*' wildcard character is especially useful as it stands for any number of any characters. For example, to list all files that have a .ora file extension, enter:

$ ls *.ora

which might display, for example, init.ora, oapref.ora and tnsnames.ora.

$ rm *

deletes all files from your current directory.

Symbols

Slash

The `/' slash character in UNIX has two meanings. A `/' slash by itself, or at the beginning of a pathname, means the root directory. Slashes are also used to separate directory names and file names in long pathnames.

Dollar Sign

The `$' dollar sign has two uses in UNIX.

The dollar sign is used with environment variables to indicate `the value of' the variable. For instance, if your ORACLE_SID is set to `test' and you enter echo $ORACLE_SID, the operating system returns the value (`test').

For example:

$ echo $ORACLE_SID
test

If you enter echo ORACLE_SID, without the dollar sign, the operating system returns ORACLE_SID.

For example:

$ echo ORACLE_SID
ORACLE_SID

The dollar sign is also commonly used as the ready prompt for the Bourne and Korn shells, as in the preceding examples.

Overview of Basic UNIX Commands

Basic UNIX Commands for Chapter 1, Requirements and Features

Operating System Patches and Packages

To find out which patches and packages are installed, enter:

For patches:

$ showrev -p

For packages:

$ pkginfo -i [package_name]

The `-i' selects only fully-installed packages; if you omit the optional package_name, all installed packages are listed.

Basic UNIX Commands for Chapter 2, Setting the Environment

Server Manager

Server Manager is used to execute Standard Query Language (SQL) commands.

To start the Server Manager in line mode, enter:

$ srvmgrl

Logging in as the Root User

Root user privileges allow you to perform system functions denied to other users, such as creating user names or changing permissions on files belonging to other users. The root user is also called the superuser account.

Because root access gives special (and potentially dangerous) privileges, it is often restricted to system administrators. Contact your system administrator for root access.

dba and oper groups

To restrict database administration functions to certain users, you should use the operating system administration utility (sysadm or groupadd) to create dba and oper groups in the /etc/group file. Because these groups assign Oracle DBA and OPER privileges based on operating system groups, Oracle documentation refers to these groups as OSDBA and OSOPER.

groupadd

Here is an example of how to use the groupadd command to create a dba group, with a group ID (GID) of 101:

$ groupadd -g 101 dba

umask

The umask command sets the default access permissions on created files. Use the value 022 to give read (and directory search), but not write permission, to members of your group and to other users.

To set the umask value to 022, enter the following in the .profile or .login file of the oracle account.

For the Bourne or Korn shells, add the following to .profile:

umask 022

For the C shell, add the following to .login:

umask 022

Environment Variables

Every UNIX shell has what are known as shell, or environment variables, which are values defined for your current session. These variables establish facilities you need; for example, the printer you use, your file permission settings, and the colors displayed on your monitor.

Environment variables for the Oracle Server are usually set in the .profile or .login file of the oracle account. The appropriate file is read automatically when you log in.

To set an environment variable in the Bourne shell, use the following syntax: variable_name=value; export variable_name

For example:

ORACLE_HOME=/u01/app/oracle/product/804; export ORACLE_HOME
ORACLE_SID=test; export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH

To set an environment variable in the C shell, use the following syntax:

setenv variable_name value

For example:

setenv ORACLE_HOME /u01/app/oracle/product/804
setenv ORACLE_SID test
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH

chmod

The chmod command changes read, write and execute (r for read, w for write, and x for execute) permissions of file and directories. Only the owner of a file (or the root user) can change its mode. Permissions can be changed for the user (the file's owner), members of your UNIX group, and other users (u for user, g for group, o for other).

For example, to give the user, group members and others (world), read, write and execute permissions to a file, enter:

$ chmod ugo+rwx filename

Updating the Environment

After you change the values of environment variables in .profile or .login, make sure they take effect for the current session by executing the .profile or .login file.

For the Bourne or Korn Shell:

$ . .profile

For the C shell:

% source .cshrc

Testing Network Protocols

SPX/IPX

Before you install the Oracle SPX/IPX Protocol Adapter, run the vendor-provided test to verify the network is functioning properly:

# /opt/SUNWipx/diag/bin/ipxtest 

To verify that SPX devices have the correct permissions prior to installation, log in as root user, then use the chmod command:

# chmod +rw /dev/mspx

This gives all users read and write permissions.

To verify that the Transport Protocol Stack of PC Protocol Services 1.x is running, log in as root user, then type:

# /opt /SUNWipx/bin/ipxd status

Installing Oracle Parallel Server Option

Oracle Parallel Server instances use the Distributed Lock Manager (DLM) to communicate with each other and to coordinate modifications of blocks.

To make sure DLM is running, enter:

$ ps -ef | grep dlmd

Issuing this command gives you a listing of the DLM processes that are currently running. After you issue this command, verify that the DLM program appears in the process listing.

Verifying UNIX Groups

Make sure you have an OSDBA group defined in the /etc/group file on all nodes of the cluster, by entering:

$ more /etc/group   

Verify that an identical group exists (named dba, for example) on all nodes.

Creating oracle Accounts

Create an oracle account on each node of the cluster. Ensure that:

Creating Mount Point Directories

Create a mount point directory on each node to serve as the top of your Oracle software directory structure. Ensure that:

For example, the output of an ls-l command should be identical for all nodes, and might look like:

drwxr -xr-x   1   oracle    dba      85 May 21 12:13 u01
User Equivalence

Set up user equivalence, so the oracle account has seamless access to all nodes, by adding entries for the other nodes in the cluster to the .rhosts file of the oracle account, or the /etc/hosts.equiv file.

Basic UNIX Commands for Chapter 3, Installation Tasks

Start the Installer

Start the Installer by entering one of the following commands:

./orainst /m for Motif mode

./orainst /c for character mode.

Basic UNIX Commands for Chapter 4, Configuring the Oracle8 System

Run the root.sh Script

To run the root.sh script, enter the following:

# cd $ORACLE_HOME/orainst
# ./root.sh

Basic UNIX Commands for Installing Oracle8
Table B-1 Basic UNIX Commands
User Commands   Description  

cat

 

concatenate and display

 

cd

 

change working directory

 

chgrp

 

change the group ownership of a file

 

chmod

 

change the permissions mode of a file

 

chown

 

change owner

 

cp

 

copy files

 

echo

 

echo arguments to the standard options

 

env

 

obtain or alter environment variables for command execution

 

find

 

find files by name, or by other characteristics

 

grep

 

search a file for a string or regular expression

 

groupadd

 

create a user group

 

kill

 

send a signal to a process, or terminate a process

 

ls

 

list the contents of a directory

 

man

 

display UNIX reference manual pages; find reference pages by keyword

 

mkdir

 

make a directory

 

more

 

browse or page through a text file

 

mv

 

move or rename files

 

page

 

browse or page through a text file

 

passwd

 

change local or Network Information System (NIS) password information

 

ps

 

display the status of current processes

 

pwd

 

display the pathname of the current working directory

 

rlogin

 

start a login to a different machine

 

rm

 

remove (unlink) files or directories

 

rmdir

 

remove (unlink) files or directories

 

set

 

set the values of all shell variables

 

setenv

 

set environment variables

 

umask

 

show the permissions that are given to view files by default

 

uname

 

display name of the current system

 

Basic UNIX Syntax and Descriptions

cat filename

Displays contents of filename to screen. Use the cat command to concatenate and display files containing text that UNIX can display on your screen.

Examples:

Use cat filename to display contents of filename to the screen.

Use cat filename1 > filename2 to overwrite contents of filename2 with filename1.

Use cat filename1>> filename2 to append contents of filename1 to filename2.

cd

Changes the current working directory.

Examples:

To change to your own home directory, enter:

cd

To change to the previous higher directory, enter:

cd ..

To change to the specified directory, enter:

cd /usr

chgrp group_name filename

Changes the group that has access to a file or directory.

Example:

Use chgrp dba tools.dbf to make the dba group the owner of the file tools.dbf.

chmod code_name + code_name filename

Changes read, write, execute permissions on filename for user/owner, group and others.

Examples:

Use the chmod ugo+rwx filename syntax to give user (file owner), group members and others, read, write and execute permissions to a file.

Use the chmod go-r filename syntax to prevent group members and others from reading the file.

chown username filename

Changes the owner of filename to the given user.

Example:

chown /var/tmp/foo

cp filename1 filename2

Copy filename1 to filename2. This creates filename2, if it does not already exist.

Example:

cp filename1 filename2

cp -i * directory_name

Copies all files in current directory to the given directory_name. If `-i' is used you are prompted to verify whether or not any files of the same name should really be overwritten in the target directory.

echo $variable_name

Displays the value you have set for a given variable. For example, to see what your current search path is, enter:

For the Bourne or Korn shell:

$ echo $LD_LIBRARY_PATH

find . -name 'string*' -print

Searches the current directory and all subdirectories for any files starting with the value string. If found, the full file names are printed to the screen.

grep string filename

Searches the specified file for a particular string.

Example:

To find out if jwilson is a valid username listed in the password file, enter:

grep jwilson /etc/passwd 

kill process_number

Terminates a selected process, identified by the process_number. First use the ps command to list the numbers of running processes.

Example:

kill 1351

If the normal kill command does not work, use:

kill  -9 process_number

but be sure you have the correct process, as this is a forced termination.

ls

Displays the names of the files in the current directory. When ls is used with the -a option, `dot' files, .login for example, are listed. When ls is used with the -l option, a long list consisting of userID, file size, date the file was created, and the name of the file is shown.

ls -al directory

Displays the files in the specified directory.

man command_name

Displays online manual pages for command_name.

Use the man who syntax to find out how to use the UNIX `who' command.

mkdir directory

Creates a new directory under the current directory.

Example:

 mkdir letters

mv filename directory

Use this command to move a file from one location to another, or to rename a file and erase the original file.

Example:

Use mv filename /usr/opt/ to delete filename from the current directory and make a new filename in the /user/opt/ directory.

passwd

Allows you to change your login password.

ps

Lists the current processes that are executing.

pwd

Displays the current directory in which you are working.

rlogin host_name

Allows you to connect and work on a different machine on your network.

Example:

rlogin hostb

rm filename

Deletes filename from the disk without verifying whether or not this is something you really want to do.

Example:

rm oldletter

rm -i filename

Deletes filename after verifying that you want to erase the file.

Example:

rm -i oldletter

rmdir directory

Deletes a directory only if it is empty

Example:

rm directory
rmdir: Directory not empty

rmdir -r directory

Deletes a directory and all the files it contains, and any subdirectories without asking for verification.

Example:

rmdir -r directory

su

Switches you to root user after a password prompt.




Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index