Полезная информация

Oracle8 Installation Guide
Release 8.0.5 for Intel-LINUX






Prev Next

Basic LINUX for Installing Oracle8

This appendix is organized as follows:

Essential LINUX Concepts

Case Sensitivity

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

Executable Scripts

To run any executable script, enter:


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


Wildcard Characters

LINUX 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 LINUX 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 LINUX.

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

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

For example:


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 LINUX Commands

Basic LINUX commands for a given chapter they will appear below only if they are necessary.

Basic LINUX 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 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

Environment Variables

Every LINUX 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/805; export ORACLE_HOME

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/805
setenv ORACLE_SID test


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 LINUX 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
Verifying LINUX Groups

Make sure you have an OSDBA group defined in the /etc/group file by entering:

$ more /etc/group   

Verify that the OSDBA group exists (named dba, for example).

Creating oracle Accounts

Create an oracle account. Ensure that:

Basic LINUX Commands for Chapter 3, Installation Tasks

Start the Installer

Start the Installer by entering the following command:

./orainst /c

Basic LINUX 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 LINUX Commands for Installing Oracle8
Table B-1 Basic LINUX Commands
User Commands   Description  



concatenate and display




change working directory




change the group ownership of a file




change the permissions mode of a file




change owner




copy files




echo arguments to the standard options




obtain or alter environment variables for command execution




find files by name, or by other characteristics




search a file for a string or regular expression




create a user group




send a signal to a process, or terminate a process




list the contents of a directory




display LINUX reference manual pages; find reference pages by keyword




make a directory




browse or page through a text file




move or rename files




change local or Network Information System (NIS) password information




display the status of current processes




display the pathname of the current working directory




start a login to a different machine




remove (unlink) files or directories




remove (unlink) directories




set the values of all shell variables




set environment variables




show the permissions that are given to view files by default




display name of the current system


Basic LINUX Syntax and Descriptions

cat filename

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


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.


To change to your own home directory, enter:


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.


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

chmod level + perm filename

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


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 (Oracle).


chown user  /temp/foo

cp filename1 filename2

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


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:


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.


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.


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.

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 LINUX who command.

mkdir directory

Creates a new directory under the current directory.


 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.


Use mv filename /usr/opt/ to delete filename from the current directory and make a new filename in the /usr/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.

rlogin host_name

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


rlogin hostb

rm filename

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


rm filename

rm -i filename

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


rm -i oldletter

rmdir directory

Deletes a directory only if it is empty


rmdir directory
rmdir: Directory not empty

rm -rf directory

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


rm -rf directory


Switches you to root user after a password prompt.


Copyright © 1999 Oracle Corporation.

All Rights Reserved.