Tag Archives: Operating Systems

Operating Systems, Oracle 8.1.5 설치 및 구동

목적: Oracle 8.1.5 설치 및 구동

참고 자료
Oracle8i Installation Guide Release 8.1.5 for Intel UNIX (DG/UX Intel, SCO UnixWare, Solaris Intel)rn

Oracle 8.1.5 설치
1. Oracle 계정 및 그룹생성

Aramaki:/export/home/oracle> # id
uid=500(oracle) gid=100(dba)

2. Setting the Environment
2.1. Setup Tasks to Perform as the root User
가. Configure the UNIX Kernel for Oracle8i
For Solaris Intel, the following lines are examples of additions to the /etc/system file to configure the UNIX kernel with the minimum recommended values:

Aramaki:/etc> # vi system
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=100
set semsys:seminfo_semmns=200
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767

Reboot the system if you have modified the kernel

Aramaki:/etc> # reboot -- -r

2.2 Setup Tasks to Perform as the oracle User
가. Set Permissions for File Creation
Set umask to 022 for the oracle account to ensure group and other have read and execute permissions, but not write permission, on the files the OUI creates.

– Enter the umask command to check the current setting.
– If the umask command does not return 022, set it in the .profile or .login file of the oracle account:
umask 022

나. Set Environment Variables

– Display
Display 설정을 shell의 종류에 따라 아래와 같이 수정한다.

For the Bourne or Korn shells:
On the server where the Oracle database will be installed, enter the following:
$ DISPLAY=workstation_name:0.0
$ export DISPLAY

In the session on your workstation:
$ xhost +server_machine_name

For the C shell:
On the server where the Oracle database will be installed, enter the following:
% setenv DISPLAY workstation_name:0.0

In the session on your workstation:
% xhost +server_machine_name

주(註): 이하 환경변수 설정은 C shell을 기본으로 한다.

– ORACLE_BASE
Specifies the directory at the top of the Oracle software and administrative file structure. The OFA-recommended value is software_mount_point/app/oracle. For example: /u01/app/oracle. If you are not using an OFA-compliant system, you do not have to set ORACLE_BASE.
setenv ORACLE_BASE /app/oracle

– ORACLE_HOME
Specifies the directory containing the Oracle software for a given release. The OFA-recommended value is: /product/release. For example: /u01/app/oracle/product/8.1.5.

setenv ORACLE_HOME $ORACLE_BASE/product/815

Ensure that the value of ORACLE_HOME points to a directory that does not already contain any Oracle software.

– NLS_LANG
Required to be set if installing or creating a database that uses a character set other than US7ASCII (the default). A complete list of valid character sets is available in Appendix A, “National Language Support” of this manual.

setenv NLS_LANG KOREAN_KOREA.KO16KSC5601

– ORA_NLS33
Required if creating a database with a storage character set other than US7ASCII. Set ORA_NLS33 to /ocommon/nls/admin/data before starting the OUI or creating the database.

setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data

– PATH
Verify that the search path includes all of the following:
/bin, /bin, and /usr/bin

For Solaris Intel, verify that the search path also includes /usr/ccs/bin and /opt/SUNWspro/bin if the SUN C Compiler is present.

– TMPDIR
You must specify a directory with at least 100 MB free space, where the Installer has write permission.
On DG, the default setting is /tmp.
On SCO UnixWare, the default setting is /var/tmp.
On Solaris Intel, the default setting is /var/tmp.

– 환경설정 예

# @(#)cshrc 1.11 89/11/29 SMI
umask 022

setenv DISPLAY `hostname`:0.0
setenv ORACLE_BASE /app/oracle
setenv ORACLE_HOME $ORACLE_BASE/product/815
setenv NLS_LANG KOREAN_KOREA.KO16KSC5601
setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data
setenv TMPDIR /var/tmp
setenv EDITOR /usr/local/bin/vim
setenv VISUAL /usr/local/bin/vim
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/openwin/lib:
setenv MANPATH /usr/man:usr/local/man:/usr/openwin/man:/usr/java/man:
setenv JAVA_HOME /usr/j2sdk1.4.2_07
setenv CATALINA_HOME /usr/local/jakarta-tomcat-5.0.28

이하생략

다. Update the Environment for Current Session
After setting environment variables in the.profile or.login file of the oracle account, update the environment in the current shell session.

For the Bourne or Korn shell:
$ . ./.profile

For the C shell:
% source .login

3. Installation
가. CDE 환경에서 logout후 user는 oracle, 언어는 C-POSIX CDE 환경에 login 한다.

나. Solaris의 cdrom은 auto mount 되므로 cdrom의 file manager에서 runInstall 을 실행한다.

다. GUI 화면이 나오면서 설치 디렉토리를 물어본다.
먼저 설치될 디렉토리의 uid와 gid를 oracle, dba로 수정한다.

Aramaki:/> chown oracle app
Aramaki:/> chgrp dba app

그 후, GUI 화면 기본값을 사용하여 생성한다.

라. UNIX Group Name은 oracle user의 그룹명을 입력
UNIX Group Name : dba

마. /tmp/OraInstall/orainstRoot.sh 를 root 의 권한으로 실행한다.

Aramaki:/> # /tmp/OraInstall/orainstRoot.sh
오라클 인벤토리 포인터 파일 생성 중 (/var/opt/oracle/oraInst.loc)
그룹명 변경 중 /app/oracle/oraInventory to dba.

바. popup 창의 retry를 수행

사. Available Products
Oracle Enterprise Edition 8.1.5: Oracle db server와 관련된 모든 프로그램
Oracle 8i Client 8.1.5: client용 프로그램
Oracle Programmer 8.1.5: 기본적인 클라이언트 프로그램(Net8, SQL*Pluse) 및 프리 컴파일러, 도움말등.
위 3가지의 목록중 본인은 Oracle Enterprise Edition 8.1.5를 선택.

아. Installation Types
Typical (694 MB)
Minimal (553 MB)
Custom
위 3가지의 목록중 본인은 언어설정을 하기 위하여 Custom을 선택.

자. Available Products Components
Product Languages 에서 언어를 변경할 수 있다.
기본 영어에 한국어를 추가했다.

차. Component Locations
Java Runtime Environment 1.1.7의 설치 위치를 선택한다.
기본값을 선택.

카. Authentication Methods
Oracle 보안설정
기본값을 사용.

타. Create Database
기본값인 Yes를 사용.

파. Database Identification
Global Database Name과 SID 를 설정한다.
본인의 경우에는 VENUS와 ORCL

하. Database File Location
기본값인 /app/oracle/product/815/dbs를 사용.

가. Oracle Protocol Support
기본값인 TCP/IP (native protocol detected)를 사용.

나. Summary
지금 것 선택한 설정이 출력된다.

다. Install
설치작업이 시작된다.

라. Install 완료 후, root 권한으로 root.sh file를 실행.

Aramaki:/app/oracle/product/815> # ./root.sh
Running Oracle8 root.sh script...

The following environment variables are set as:
   ORACLE_OWNER= 500
   ORACLE_HOME= /app/oracle/product/815
   ORACLE_SID=  ORCL

Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/local/bin

Creating /var/opt/oracle/oratab file...
Entry will be added to the /var/opt/oracle/oratab file by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

마. Net8 설정

바. CLASSPATH environment variable 수정

Aramaki:/export/home/oracle> vi .cshrc
생략

setenv ORACLE_OWNER oracle
setenv ORACLE_SID ORCL

set path=(/bin /usr/j2sdk1.4.2_07/bin /usr/bin /usr/ccs/bin /usr/ucb /etc

        /usr/sbin

        /usr/local/bin

        /app/oracle/product/815/bin .)

이하생략

사. 완료

아. Reboot

Aramaki:/app/oracle/product/815> # reboot -- -r

Oracle 8.1.5 구동
1. 데이터베이스 구동

Aramaki:/export/home/oracle> svrmgrl

Oracle Server Manager Release 3.1.5.0.0 - Production

(c) Copyright 1997, Oracle Corporation. All Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production

SVRMGR> startup
ORA-01031: insufficient privileges
SVRMGR> connect internal
연결되었습니다
SVRMGR> startup
ORACLE 인스턴스가 시작되었습니다
시스템 글로벌 영역                 35028368 바이트 합계
Fixed Size                            64912 바이트
Variable Size                        18014208 바이트
Database Buffers                      16777216 바이트
Redo Buffers                          172032 바이트
데이터베이스가 올려졌습니다
데이터베이스가 열려졌습니다
SVRMGR> exit
Server Manager 완료

2. 데이터베이스 종료

Aramaki:/export/home/oracle> svrmgrl

Oracle Server Manager Release 3.1.5.0.0 - Production

(c) Copyright 1997, Oracle Corporation. All Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production

SVRMGR> connect internal
연결되었습니다
SVRMGR> shutdown
데이터베이스가 닫혔습니다
데이터베이스가 분리되었습니다
ORACLE 인스턴스가 종료되었습니다
SVRMGR> quit
Server Manager 완료
Aramaki:/export/home/oracle>

3. Listener 구동

Aramaki:/export/home/oracle> lsnrctl start

LSNRCTL for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production on 25-AUG-01 00:14:45

(c) Copyright 1998 Oracle Corporation. All rights reserved.


Starting /app/oracle/product/815/bin/tnslsnr: please wait...

TNSLSNR for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production
System parameter file is /app/oracle/product/815/network/admin/listener.ora
Log messages written to /app/oracle/product/815/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production
Start Date 25-AUG-01 00:14:47
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /app/oracle/product/815/network/admin/listener.ora
Listener Log File /app/oracle/product/815/network/log/listener.log
Services Summary...
PLSExtProc has 1 service handler(s)
ORCL_2 has 1 service handler(s)
The command completed successfully

4. Listener 종료

Aramaki:/export/home/oracle> lsnrctl stop

LSNRCTL for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production on 25-AUG-01 00:24:13

(c) Copyright 1998 Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
The command completed successfully

5. SQL*plus 접속확인
sqlplus scott/tiger 또는 SYS사용자 sys/change_on_install
DBA권한을 가진 테이타 디렉토리 소유자인 system/manager 로 접속한다.

Aramaki:/export/home/oracle> sqlplus sys/change_on_install

SQL*Plus: Release 8.1.5.0.0 - Production on 토 Aug 25 00:26:30 2001

(c) Copyright 1999 Oracle Corporation. All rights reserved.



Connected to:
Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production

SQL>

6. C shell 설정 예

# @(#)cshrc 1.11 89/11/29 SMI
umask 022

setenv DISPLAY `hostname`:0.0
setenv ORACLE_BASE /app/oracle
setenv ORACLE_HOME $ORACLE_BASE/product/815
setenv NLS_LANG KOREAN_KOREA.KO16KSC5601
setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data
setenv TMPDIR /var/tmp
setenv ORACLE_OWNER oracle
setenv ORACLE_SID ORCL
setenv EDITOR /usr/local/bin/vim
setenv VISUAL /usr/local/bin/vim
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/openwin/lib:
setenv MANPATH /usr/man:usr/local/man:/usr/openwin/man:/usr/java/man:
setenv JAVA_HOME /usr/j2sdk1.4.2_07
setenv CATALINA_HOME /usr/local/jakarta-tomcat-5.0.28

set path=(/bin /usr/j2sdk1.4.2_07/bin /usr/bin /usr/ccs/bin /usr/ucb /etc

         /usr/sbin

         /usr/local/bin

        /app/oracle/product/815/bin .)
if ( $?prompt ) then
   set history=32
endif

# This allows the escape key to be used for filename completion
# in a csh line command.
set filec

# For hostname and full pathname in the prompt.
set prompt="`hostname`:$cwd> "
alias cd 'cd !*;set prompt="`hostname`:$cwd> "'

주(註): 공백과 싱클 쿼터 마크에 주의

# User specific aliases and functions
alias ls   'ls -F'
alias l   'ls -l'
alias ll   'ls -al|more'

수정 일자
2001/08/21
2001/06/09
2001/06/10
2001/06/17
2005/02/25
2007/10/14