| Oracle8 Installation Guide for LINUX Release 8.0.5 A66251-01 |
|
이 부록은 다음과 같이 구성되어 있다:
LINUX는 대소문자를 구별하며 대부분의 LINUX 명령어는 소문자로 이루어져 있다. 예를 들면, LINUX에서 Email.Log와 email.log는 다른 파일이다. 그러므로, 파일과 디렉토리의 이름을 적고 접근할 때 주의해야 한다.
실행가능한 스크립트를 실행하기 위해서는 다음과 같이 입력하라:
./script_name
예를 들면, root.sh script를 실행하기 위해서는 다음과 같이 명령어를 준다:
./root.sh
LINUX는 여러개의 파일이름과 파일 형식을 명시하기 위해, wildcard라고 하는 몇가지 특수문자를 제공한다. `*' wildcard 문자는, 어떤 문자가 몇자가 오든지 상관없음을 나타낸다. 예를 들면 .ora라는 확장자를 가진 파일을 모두 보길 원한다면 다음과 같이 입력하라:
$ ls *.ora
이것은 예를들면, init.ora, oapref.ora 그리고 tnsnames.ora 등의 파일을 출력하게 된다.
$ rm *
현재 디렉토리에 있는 모든 파일을 지운다.
`/' slash 문자는 리눅스에서 두가지 의미를 가진다. `/' 자체는 또는 경로명의 첫글자로 사용되면 root directory를 의미하게 된다. Slashes는 또한 긴경로명을 디렉토리를 분리할 때 사용한다.
`$' 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_SIDORACLE_SID
Dollar sign은 앞의 예에서 처럼 Bourne shell과 Korn shell의 프람프트로서 자주 사용된다.
주어진 chapter에서 사용된 기본적인 LINUX 명령어는 여러분들이 필요할 때에만 아래 나타날 것이다.
Server Manager 는 Standard Query Language (SQL) 명령어를 실행하기 위해서 필요한다.
행모드(line mode)에서 Server Manager를 시작하기 위해서 다음을 입력하라:
$ srvmgrl
Root user는 사용자를 추가한다든지, 다른 사용자에게 속한 파일의 permission을 바꾼다든지 하는 등의, 다른 사용자에게는 허용되지 않는 시스템 기능을 사용할 수 있도록 허용하고 있다. 그래서 root user는 superuser라고도 불린다.
root의 접근은 특권을 가지기 때문에 (잠재적으로 상당히 위험할 수 있다), 시스템 관리자에는 접근을 제한한다. root 접근을 하기 위해서는 시스템 관리자와 접촉하라.
사용자에게 데이터베이스 관리 기능을 제한하기 위하여, dba와 oper groups을 /etc/group file내에 추가하기 위하여, 운영체계의 유틸리티인 groupadd를 이용한다. 이들 group은 운영체계를 기반으로 한 Oracle DBA와 OPER 권한을 가지게 된다. 오라클 문서에서는 이들 그룹들을 OSDBA와 OSOPER로 명시하고 있다.
다음은 groupadd 명령어를 이용하여 group ID (GID) 101을 가지는 dba group 을 생성하는 방법을 보여주고 있다:
$ groupadd -g 101 dba
umask 명령어는 생성되는 파일에 대한 기본적인 접근 권한을 설정한다. 022 로 설정하면 여러분들의 그룹과 다른 사용자들에게 읽기 (그리고 디렉토리 찾기) 허용을 하지만, 쓰기 허용은 하지 않는다.
umask 값을 022로 설정하기 위하여, oracle 계정의 .profile 또는 .login file에 다음 줄을 추가하라.
Bourne 또는 Korn shells 에서는, .profile에 다음을 추가하라:
umask 022
C shell에서는, .login에 다음을 추가하라:
umask 022
모든 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에서 환경변수를 설정하기 위해서 다음 문법을 이용하라:
setenvvariable_namevalue
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 명령어는 파일의 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+rwxfilename
.profile 또는 .login 내에 있는 환경변수의 값을 바꾼 후에는, .profile 또는 .login file을 실행하여 효력이 나타나도록 해야 한다.
For the Bourne or Korn Shell:
$ . .profile
For the C shell:
% source .cshrc
OSDBA group 이 /etc/group file에 포함되어 있는지, 다음 명령으로 확인해 보라:
$ more /etc/group
OSDBA group 이 있느지 확인하라 (예를 들면, dba 라는 이름의).
oracle 계정을 생성하라. 다음을 확인하라:
다음 명령어를 입력하여 Installer를 시작하라:
./orainst /c
root.sh script를 실행하기 위하여 다음과 같이 입력하라:
# cd $ORACLE_HOME/orainst# ./root.sh
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.
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 (Oracle).
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 LINUX 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 /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.
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.