Oracle8 Installation Guide Release 8.0.4 Part Number A56097-01 |
|
This appendix is organized as follows:
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.
To run any executable script, enter:
./
script_name
For example, to run the root.sh
script, the command is:
./root.sh
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.
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.
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.
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.
Server Manager is used to execute Standard Query Language (SQL) commands.
To start the Server Manager in line mode, enter:
$ srvmgrl
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.
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.
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
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
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_namevalue
For example:
setenv ORACLE_HOME /u01/app/oracle/product/804 setenv ORACLE_SID test setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH
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
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
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
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.
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.
Create an oracle account on each node of the cluster. Ensure that:
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
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.
Start the Installer by entering one of the following commands:
./orainst /m
for Motif mode
./orainst /c
for character mode.
To run the root.sh
script, enter the following:
# cd $ORACLE_HOME/orainst
# ./root.sh
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.
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
Changes the group that has access to a file or directory.
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.
Changes the owner of filename to the given user
.
Copy filename1 to filename2. This creates filename2, if it does not already exist.
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.
Displays the value you have set for a given variable. For example, to see what your current search path is, enter:
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.
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
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.
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.
Displays the files in the specified directory.
Displays online manual pages for command_name
.
Use the man who
syntax to find out how to use the UNIX `who' command.
Creates a new directory under the current 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.
Allows you to change your login password.
Lists the current processes that are executing.
Displays the current directory in which you are working.
Allows you to connect and work on a different machine on your network.
Deletes filename from the disk without verifying whether or not this is something you really want to do.
Deletes filename after verifying that you want to erase the file.
Deletes a directory only if it is empty
rmdir: Directory not emptyDeletes a directory and all the files it contains, and any subdirectories without asking for verification.
Switches you to root
user after a password prompt.