first edition oracle 8i - wordpress.com...1 구현 환경 host os: windows 7 ultimate k (x64) guest...

26
홍진관 Jinkwan Hong First Edition Oracle 8i 설치 가이드

Upload: others

Post on 08-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

홍진관Jinkwan Hong

First Edition

Oracle 8i설치 가이드

Page 2: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

Oracle 8i목차

CH.1 설치전 준비사항

! Section 1. 설치전 과정

! Section 2. 설치에 필요한 프로그램 설치

! Section 3. 디렉토리 생성 및 환경변수 설정

CH.2 오라클 엔진 설치 #OUI

! Section 1. 오라클 엔진 설치 #OUI

! Section 2. 설치 확인

! ! CH.4 Database 생성 # OUI

! Section1. Database 생성 #OUI

! Section2. Database 생성 확인

만든이 및 참고자료 목록

홍진관

http://[email protected]

설치 가이드

Page 3: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

1 구현 환경

Host OS: Windows 7 Ultimate K (x64)Guest OS:Red Hat Enterprise Linux 3 (x32)Virtual Machine: VMware 9Process: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHzMemory: 4gb

설치에 필요한 프로그램

jdk118_v3-glibc-2.1.3.tar.bz2jre118_v3-glibc-2.1.3.tar.bz2i386-glibc-2.1-linux.tar.gzglibc-2.1.3-stubs.tar.gzLinux_or_817.iso

설치 전 준비사항

Page 4: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

설치전에 필요한 과정

1. 그룹 및 사용자 설정

1. 설치에 필요한 파일 복사

3

1.1.1. 설치에 사용될 그룹 및 사용자 설정

# groupadd -g 5000 dba! ! // 그룹 생성

# useradd -g dba -d /home/oracle oracle!! // 계정 생성

# passwd oracle 

1.1.2. scp를 통해 파일 복사

jdk118_v3-glibc-2.1.3.tar.bz2jre118_v3-glibc-2.1.3.tar.bz2i386-glibc-2.1-linux.tar.gzglibc-2.1.3-stubs.tar.gzLinux_or_817.iso

> Client OS의 /home/oracle 로 복사

Section 1

설치 전 과정

Page 5: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

설치에 필요한 프로그램

1. JDK 1.1.8_v3 (Java Developer Kits)

2. JRE 1.1.8_v3 (Java Runtime Environments)

3. i386-glibc-2.1 (glibc 2.1)

4

1.2.1. jdk 설치 및 심볼릭 링크 생성

[root@OracleServer root]# cd /home/oracle

[root@OracleServer oracle]# mv jdk118_v3-glibc-2.1.3.tar.bz2 /usr/local

# cd /usr/local

[root@OracleServer local]# tar jxvf jdk118_v3-glibc-2.1.3.tar.bz2

# ln -s /usr/local/jdk118_v3 /usr/local/java

# chown -R oracle.dba /usr/local/java

Section 2

설치에 필요한 프로그램 설치

Page 6: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

5

1.2.2. jre 설치 및 심볼릭 링크 생성

[root@OracleServer root]# cd /home/oracle

[root@OracleServer oracle]# mv jre118_v3-glibc-2.1.3.tar.bz2 /usr/local

# cd /usr/local

[root@OracleServer local]# tar jxvf jre118_v3-glibc-2.1.3.tar.bz2

# ln -s /usr/local/jre118_v3 /usr/local/jre

# chown -R oracle.dba /usr/local/jre

1.2.3. gcc 컴파일러 및 관련 library 백업 및 버전교체

[root@OracleServer root]# cd /home/oracle

[root@OracleServer oracle]# mv i386-glibc-2.1-linux.tar.gz /

# cd /

[root@OracleServer /]

# tar zxvf i386-glibc-2.1-linux.tar.gz

[root@OracleServer /]# cd /usr/bin

[root@OracleServer bin]# mkdir backup

# mv gcc cc ld backup

# ln -s /usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-gcc gcc

# ln -s gcc cc

# ln -s /usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-ld ld

Page 7: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

6

[root@OracleServer bin]# cd /usr/lib

[root@OracleServer lib]# mkdir backup

# mv libc.so libdl.so libm.so libpthread.so backup

# mv libc.a libdl.a libm.a libpthread.a backup

Page 8: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

디렉토리 생성 및 환경변수 설정

1. 디렉토리 생성

2. 환경변수 설정

7

1.3.1. 설치에 필요한 디렉토리 생성

[root@OracleServer lib]# cd /home/oracle

[root@OracleServer oracle]# mkdir tmp

# mkdir -p oraInventory

1.3.2. 환경변수 설정

[root@OracleServer oracle]# vi .bash_profile (또는 vi /home/oracle/.bash_profile)

아래 내용을 추가해준다

Section 3

디렉토리 생성 및 환경변수 설정

Page 9: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

8

umask 022 

export ORACLE_TERM=vt100  

export LD_ASSUME_KERNEL=2.2.5  

export ORACLE_BASE=/home/oracle       // DB가 저장되는 경로

export ORACLE_HOME=$ORACLE_BASE/product/8.1.7      // 엔진이 설치되는 위치

export ORACLE_OWNER=oracle 

export ORACLE_SID=testdb  

export TMP_DIR=$ORACLE_BASE/tmp 

export PATH=.:$ORACLE_HOME/bin:/usr/local/java/bin:$PATH 

export TNS_ADMIN=$ORACLE_HOME/network/admin 

export NLS_LANG=American_America.KO16KSC5601 

export ORA_NL33=$ORACLE_HOME/ocommon/nls/admin/data 

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH 

export LANG=C 

마지막으로 오라클 홈 디렉토리 밑의 모든 디렉토리 소유권을 oracle 계정 으로 넘겨주면 설치를 위한 준비과정이 끝나게 된다.

[root@OracleServer oracle]

# chown -R oracle.dba /home/oracle

Page 10: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

2 OUI환경에서의 오라클 엔진 설치Oracle 8i

오라클 엔진설치 #OUI (Oracle Universal Installer)

Page 11: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

오라클 엔진설치

1. 그래픽 환경(X window)에서 오라클 설치

10

2.1.1. OUI 윈도우

[oracle@OracleServer oracle]$ cd /home/oracle/Linux_or_817[oracle@OracleServer Linux_or_817]$ chmod 755 runInstaller.$ cd install/linux [oracle@OracleServer linux]$ chmod 755 runInstaller.$ cd ../..[oraclet@OracleServer Linux_or_817]$./runInstaller

Section 2

오라클 엔진 설치 #OUI

Page 12: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

11

Page 13: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

12

// 실행 중 이런 메시지가 뜬다. 루트 권한으로 다음 파일을 실행 해준다.

# /home/oracle/product/8.1.7/orainstRoot.sh

Creating Oracle Inventory pointer file (/etc/oraInst.loc)Changing groupname of /home/oracle/oraInventory to dba.

다시 돌아가서 재시도 클릭

Page 14: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

13

// 필요한 컴포넌트를 설치해 준다.

Page 15: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

14

Page 16: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

15

Page 17: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

16

Page 18: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

17

Page 19: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

18

// 설치가 되다보면 창이 하나 뜬다. 

루트 권한으로 /home/oracle/product/8.1.7/root.sh를 실행[root@OracleServer root]# /home/oracle/product/8.1.7/root.sh

~~ 생략 ~~

Enter the full pathname of the local bin directory: [/usr/local/bin]:\nCreating /etc/oratab file...Adding entry to /etc/oratab file...Finished running generic part of root.sh script.Now product-specific root actions will be performed.

후에 원래 창으로 돌아가서 OK를 클릭하고 계속한다.

Page 20: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

19

// Perform typical configuration을 체크 한뒤 Next. 모든 것이 종료 된 후 인스톨을 종료한다.

Page 21: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

설치확인

1. 설치확인

20

2.2.1. 설치확인

oracle 계정에서[oracle@OracleServer oracle]$ sqlplus internal

[oracle@OracleServer oracle]$ sqlplus internal

SQL*Plus: Release 8.1.7.0.0 - Production on Thu Mar 27 16:59:59 2014 (c) Copyright 2000 Oracle Corporation.  All rights reserved.

Connected to an idle instance.

SQL>

에러 없이 실행되면 설치 성공!

Section 2

설치확인

Page 22: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

3 OUI 환경에서의 Database 생성

Database 생성

Page 23: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

OUI 환경에서의 Database 생성성

1. OUI를 통한 Database 생성

2. Database 생성 확인

22

3.1.1. OUI를 통한 Database 생성

그래픽 콘솔에서 dbassist를 실행

[oracle@OracleServer oracle]$ dbassist

Section 1

Database 생성 # OUI

Page 24: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

23

Page 25: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

생성확인

1. 생성확인

24

2.2.1. 설치확인

oracle 계정에서[oracle@OracleServer oracle]$ sqlplus internal

[oracle@OracleServer oracle]$ sqlplus internal

SQL*Plus: Release 8.1.7.0.0 - Production on Thu Mar 27 16:59:59 2014 (c) Copyright 2000 Oracle Corporation.  All rights reserved.

Connected to an idle instance.

SQL> select status from v$instance;

STATUS-------OPEN! // Database가 열려 있는 것을 확인 할 수 있다.

Section 2

생성확인

Page 26: First Edition Oracle 8i - WordPress.com...1 구현 환경 Host OS: Windows 7 Ultimate K (x64) Guest OS: Red Hat Enterprise Linux 3 (x32) Virtual Machine: VMware 9 Process: Intel(R)

xxv

© 작성: 홍진관http://[email protected]

참고: 서진수 강사님 ! Big data & Cloud Computing환경에서의 Data Specialist 양성 과정 강사! 오라클 관리 실무

Oracle 8i 설치 가이드