Oracle8 Installation Guide for LINUX
Release 8.0.5

A66251-01

Library

Product

Contents

Index

Prev Next

B
Basic LINUX for Installing Oracle8

이 부록은 다음과 같이 구성되어 있다:

Essential LINUX Concepts

Case Sensitivity

LINUX는 대소문자를 구별하며 대부분의 LINUX 명령어는 소문자로 이루어져 있다. 예를 들면, LINUX에서 Email.Log와 email.log는 다른 파일이다. 그러므로, 파일과 디렉토리의 이름을 적고 접근할 때 주의해야 한다.

Executable Scripts

실행가능한 스크립트를 실행하기 위해서는 다음과 같이 입력하라:

./script_name

예를 들면, root.sh script를 실행하기 위해서는 다음과 같이 명령어를 준다:

./root.sh

Wildcard Characters

LINUX는 여러개의 파일이름과 파일 형식을 명시하기 위해, wildcard라고 하는 몇가지 특수문자를 제공한다. `*' wildcard 문자는, 어떤 문자가 몇자가 오든지 상관없음을 나타낸다. 예를 들면 .ora라는 확장자를 가진 파일을 모두 보길 원한다면 다음과 같이 입력하라:

$ ls *.ora

이것은 예를들면, init.ora, oapref.ora 그리고 tnsnames.ora 등의 파일을 출력하게 된다.

$ rm *

현재 디렉토리에 있는 모든 파일을 지운다.

Symbols

Slash

`/' slash 문자는 리눅스에서 두가지 의미를 가진다. `/' 자체는 또는 경로명의 첫글자로 사용되면 root directory를 의미하게 된다. Slashes는 또한 긴경로명을 디렉토리를 분리할 때 사용한다.

Dollar Sign

`$' dollar sign은 리눅스에서 두가지 의미로 사용된다.

`$' dollar sign은 환경변수와 사용되어 변수의 '변수의 값(the value of)'이라는 의미를 가지게 된다. 예를 들면, 만약 여러분들이 ORACLE_SID라는 변수를 설정하고 이를 보길 원한다면 echo $ORACLE_SID라고 입력하라. 그럼 운영체계는 그 값 (`test')를 돌려주게 된다.

For example:

$ echo $ORACLE_SID
test

만약 dollar sign 없이 echo ORACLE_SID 라고 입력하면, 운영체계는 단순히 ORACLE_SID 라고만 돌려준다.

For example:

$ echo ORACLE_SID
ORACLE_SID

Dollar sign은 앞의 예에서 처럼 Bourne shell과 Korn shell의 프람프트로서 자주 사용된다.

Overview of Basic LINUX Commands

주어진 chapter에서 사용된 기본적인 LINUX 명령어는 여러분들이 필요할 때에만 아래 나타날 것이다.

Basic LINUX Commands for Chapter 2, Setting the Environment

Server Manager

Server Manager 는 Standard Query Language (SQL) 명령어를 실행하기 위해서 필요한다.

행모드(line mode)에서 Server Manager를 시작하기 위해서 다음을 입력하라:

$ srvmgrl

Logging in as the Root User

Root user는 사용자를 추가한다든지, 다른 사용자에게 속한 파일의 permission을 바꾼다든지 하는 등의, 다른 사용자에게는 허용되지 않는 시스템 기능을 사용할 수 있도록 허용하고 있다. 그래서 root user는 superuser라고도 불린다.

root의 접근은 특권을 가지기 때문에 (잠재적으로 상당히 위험할 수 있다), 시스템 관리자에는 접근을 제한한다. root 접근을 하기 위해서는 시스템 관리자와 접촉하라.

dba and oper groups

사용자에게 데이터베이스 관리 기능을 제한하기 위하여, dba와 oper groups을 /etc/group file내에 추가하기 위하여, 운영체계의 유틸리티인 groupadd를 이용한다. 이들 group은 운영체계를 기반으로 한 Oracle DBA와 OPER 권한을 가지게 된다. 오라클 문서에서는 이들 그룹들을 OSDBA와 OSOPER로 명시하고 있다.

groupadd

다음은 groupadd 명령어를 이용하여 group ID (GID) 101을 가지는 dba group 을 생성하는 방법을 보여주고 있다:

$ groupadd -g 101 dba

umask

umask 명령어는 생성되는 파일에 대한 기본적인 접근 권한을 설정한다. 022 로 설정하면 여러분들의 그룹과 다른 사용자들에게 읽기 (그리고 디렉토리 찾기) 허용을 하지만, 쓰기 허용은 하지 않는다.

umask 값을 022로 설정하기 위하여, oracle 계정의 .profile 또는 .login file에 다음 줄을 추가하라.

Bourne 또는 Korn shells 에서는, .profile에 다음을 추가하라:

umask 022

C shell에서는, .login에 다음을 추가하라:

umask 022

Environment Variables

모든 LINUX shell 에는 shell 또는 환경변수라고 알려진 것이 있다. 이들은 여러분들이 정의한 값을 가진다. 이들 변수들은 여러분들의 편리를 위해서 만들어 진다. 예를 들면, 사용할 프린터, 파일 퍼미션 설정, 그리고 여러분들의 모니터에 출력될 칼라들 등의 설정을 위해 사용되어 진다.

오라클 서버를 위한 환경변수는 oracle 계정에 있는 .login 파일이나 .profile 내에 설정되어 진다. 여러분들이 로그인 할때 읽혀 지는 파일에 설정하면 된다.

Bourne shell에서 환경변수를 설정하기 위해서, 다음과 같은 문법을 이용하라: variable_name=value; export variable_name

예를 들면:

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

C shell에서 환경변수를 설정하기 위해서 다음 문법을 이용하라:

setenv variable_name value

For example:

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

chmod

chmod 명령어는 파일의 read (읽기), write (쓰기) 그리고 execute (실행하기) (r은 읽기, w는 쓰기, 그리고 x는 실행하기) permissions을 바꿀 수 있다. 파일의 소유자 (또는 root user만에 파일의 모드를 바꿀 수 있다. Permission은 user (파일의 소유자), 리눅스의 group 그리고 ASS="Bold">other users 에 대하여 설정할 수 있다 (u는 파일의 소유자, g는 그룹, o는 다른 사용자).

예를 들면, 파일에 user, group members 그리고 others (world), 에 대하여 read, write, 그리고 execute permissions을 줄려면 다음과 같이 입력하라:

$ chmod ugo+rwx filename

Updating the Environment

.profile 또는 .login 내에 있는 환경변수의 값을 바꾼 후에는, .profile 또는 .login file을 실행하여 효력이 나타나도록 해야 한다.

For the Bourne or Korn Shell:

$ . .profile

For the C shell:

% source .cshrc
Verifying LINUX Groups

OSDBA group 이 /etc/group file에 포함되어 있는지, 다음 명령으로 확인해 보라:

$ more /etc/group   

OSDBA group 이 있느지 확인하라 (예를 들면, dba 라는 이름의).

Creating oracle Accounts

oracle 계정을 생성하라. 다음을 확인하라:

'Chapter 3, Installation Tasks'을 위한 기본적인 리눅스 명령어

Installer를 시작하라

다음 명령어를 입력하여 Installer를 시작하라:

./orainst /c

'Chapter 4, Configuring the Oracle8 System'을 위한 기본적인 리눅스 명령어

root.sh Script를 실행하라

root.sh script를 실행하기 위하여 다음과 같이 입력하라:

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

Oracle8을 인스톨하기 위한 기본적인 리눅스 명령어
Table B-1 기본적인 리눅스 명령어
사용자 명령어   기술  

cat

 

concatenate 과 display

 

cd

 

작업 디렉토리를 변경

 

chgrp

 

파일의 소유 그룹을 변경

 

chmod

 

파일의 퍼미션 모드를 변경

 

chown

 

소유자를 변경

 

cp

 

파일 복사

 

echo

 

표준 옵션으로 인자를 출력

 

env

 

명령어 실행을 위한 환경변수를 변경하던지 얻을 수 있다.

 

find

 

파일을 이름 또는 다른 특성으로 찾을 수 있다.

 

grep

 

문자열이나 정규식으로 파일을 찾을 수 있다.

 

groupadd

 

사용자 그룹을 생성한다.

 

kill

 

프로세스에게 시그널을 보낸든지, 프로세스를 종료 시킨다.

 

ls

 

디렉토리의 내용을 디스플레이한다.

 

man

 

LINUX 참고 맨페이지를 보여준다; 참조메뉴얼을 키워드로서 찾는다.

 

mkdir

 

디렉토리를 만든다

 

more

 

텍스트 파일을 페이지 단위로 출력한다.

 

mv

 

파일을 옮기던지 이름을 변경한다

 

passwd

 

로컬 또는 NIS(Network information system)의 암호를 변경한다.

 

ps

 

현재 프로세스들의 상태를 출력한다.

 

pwd

 

현재 작업디렉토리의 경로명을 보여준다

 

rlogin

 

다른 머신으로 로그인한다.

 

rm

 

파일이나 디렉토리를 없앤다(unlink)

 

rmdir

 

디렉토리를 없앤다 (unlink)

 

set

 

모든 shell 변수의 값을 설정한다

 

setenv

 

환경변수를 설정

 

umask

 

기본적으로 view file로 주어진 permission을 보여준다

 

uname

 

현재 시스템의 이름을 보여준다

 

기본적인 리눅스 문법과 설명

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.

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

Example:

chown user  /temp/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 LINUX 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 /usr/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 filename

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:

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.

Example:

rm -rf directory

su

Switches you to root user after a password prompt.




Prev

Next
Oracle
Copyright © 1998 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index