프린트 하기

OS 환경 : Oracle Linux 4.8 (64bit)

 

DB 환경 : Oracle Database 10.2.0.3

 

방법 : Oracle Linux 4.8에 Oracle 10g R2 설치 가이드

OS 설치는 아래 게시물 참조
Oracle linux 4.8 설치 가이드(https://positivemh.tistory.com/1137)

 

 

hostname : ora10
ip : 192.168.137.10

 

 

DB 설치파일
10201_database_linux_x86_64.cpio.gz
p5337014_10203_Linux-x86-64.zip

 

 

OS 설정

/etc/hosts 설정

1
2
3
4
# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.10 ora10  --추가

 

 

hostname 확인

1
2
3
4
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=ora10
GATEWAY=192.168.137.2

 

 

미사용 서비스 종료

1
2
3
4
5
6
7
8
9
10
#
chkconfig --level 123456 xinetd off
chkconfig --level 123456 sendmail off
chkconfig --level 123456 cups off
chkconfig --level 123456 cups-config-daemon off
chkconfig --level 123456 smartd off
chkconfig --level 123456 iptables off
chkconfig --level 123456 bluetooth off
chkconfig --level 123456 isdn off
chkconfig --level 123456 pcmcia off

 

 

패키지 설치 여부 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
rpm -q binutils-*
rpm -q compat-db-*
rpm -q control-center-*
rpm -q gcc-*
rpm -q gcc-c++-*
rpm -q glibc-*
rpm -q glibc-common-*
rpm -q gnome-libs-*
rpm -q libstdc++-*
rpm -q libstdc++-devel-*
rpm -q make-*
rpm -q pdksh-*
rpm -q sysstat-*
rpm -q xscreensaver-*

 

 

추가 패키지 설치

1
2
3
4
5
6
7
8
9
10
11
12
13
# rpm -ivh glib-devel-*
warning: glib-devel-1.2.10-15.x86_64.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing...                ########################################### [100%]
   1:glib-devel             ########################################### [100%]
# rpm -ivh xorg-x11-deprecated-libs-*i386.rpm
warning: xorg-x11-deprecated-libs-6.8.2-1.0.1.EL.63.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing...                ########################################### [100%]
        package xorg-x11-deprecated-libs-6.8.2-1.0.1.EL.63 is already installed
# rpm -ivh libaio-*
warning: libaio-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing...                ########################################### [100%]
        package libaio-0.3.105-2 is already installed
        package libaio-devel-0.3.105-2 is already installed

 

 

user 및 group 추가(oracle-validated 미설치시)

1
2
3
4
5
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G oinstall,dba oracle
# id oracle
# passwd oracle

 

 

/etc/security/limits.conf 수정(oracle-validated 미설치시)

1
2
3
4
5
# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

 

 

설치용 폴더 생성 및 권한 부여

1
2
3
4
# mkdir -p /app/media
# mkdir -p /app/oracle
# chown -R oracle:dba /app
# chmod -R 755 /app

 

 

oracle 유저 .bash_profile 설정

1
2
3
4
5
6
7
8
9
10
11
12
# su - oracle
$ vi .bash_profile
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=oracle10
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$JAVA_HOME/bin:$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=192.168.137.1:0.0;
stty erase ^H
alias ss="sqlplus / as sysdba"

 

 

적용

1
$ . ./.bash_profile

 

 

미디어 업로드 및 권한 부여

1
2
3
$ cd /app/media
# chown -R oracle:dba /app/media
# chmod -R 755 /app/media

 

 

설치파일 압축 해제

1
2
$ gunzip 10201_database_linux_x86_64.cpio.gz
$ cpio -idmv < 10201_database_linux_x86_64.cpio

 

 

*참고용
나의 경우 gz 압축이 linux 상에서 제대로 안풀려서(아래 에러 발생) 윈도우에서 gz 압축을 해제하고 cpio 압축만 리눅스에서 해제함

1
2
3
$ gunzip 10201_database_linux_x86_64.cpio.gz
gunzip: 10201_database_linux_x86_64.cpio.gz: invalid compressed data--crc error
gunzip: 10201_database_linux_x86_64.cpio.gz: invalid compressed data--length error

 

 

DB 소프트웨어(엔진) 설치

runInstaller 실행

1
2
$ cd database/
$ ./runInstaller

 

 

Advanced Installation 선택

 

 

인벤토리 및 그룹 선택 후 Next 선택

 

 

Enterprise Edition 선택

 

 

홈경로 선택

 

 

사전 요구사항 Succeeded 확인

 

 

Install database Software only 선택

 

 

Install 선택

 

 

설치중

 

 

스크립트 root 계정으로 순서대로 실행 후 OK 선택

 

 

첫번째 스크립트 root 계정으로 실행

1
2
3
4
/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /app/oracle/oraInventory to 770.
Changing groupname of /app/oracle/oraInventory to oinstall.
The execution of the script is complete

 

 

두번째 스크립트 root 계정으로 실행

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...
 
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /app/oracle/product/10.2.0/db_1
 
Enter the full pathname of the local bin directory: [/usr/local/bin]:  <-- 엔터 입력
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
 
 
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed 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.

 

 

엔진 설치 완료 Exit 선택

 

 

Yes 선택

엔진 설치 완료됨

 

 

DB 소프트웨어(엔진) 패치

10.2.0.3 psu 압축 해제 후 runinstall 실행

1
2
3
$ unzip p5337014_10203_Linux-x86-64.zip
$ cd Disk1/
$ ./runInstaller

 

 

Next 선택

 

 

홈경로 설정

 

 

Install 선택

 

 

패치중

 

 

패치중

 

 

스크립트 root 계정으로 실행 후 OK 선택

 

 

스크립트 root 계정으로 실행

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...
 
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /app/oracle/product/10.2.0/db_1
 
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y  <-- y 입력
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y  <-- y 입력
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y  <-- y 입력
   Copying coraenv to /usr/local/bin ...
 
Entries will be added to the /etc/oratab file as needed 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.

 

 

패치 완료 Exit 선택

 

 

Yes 선택

 

 

패치 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$ $ORACLE_HOME/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.3.0
 
Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..
 
 
Oracle Home       : /app/oracle/product/10.2.0/db_1
Central Inventory : /app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.3.0
OUI version       : 10.2.0.3.0
OUI location      : /app/oracle/product/10.2.0/db_1/oui
Log file location : /app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2024-07-13_13-44-22PM.log
 
Lsinventory Output file location : /app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2024-07-13_13-44-22PM.txt
 
--------------------------------------------------------------------------------
Installed Top-level Products (2):
 
Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2                            10.2.0.3.0
There are 2 products installed in this Oracle Home.
 
 
Interim patches (2) :
 
Patch  5556081      : applied on Stu Jul 13 13:42:41 KST 2024
   Created on 9 Nov 2006, 22:20:50 hrs PST8PDT
   Bugs fixed:
     5556081
 
Patch  5557962      : applied on Stu Jul 13 13:42:35 KST 2024
   Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
   Bugs fixed:
     4269423, 5557962, 5528974
 
 
--------------------------------------------------------------------------------
 
OPatch succeeded.

정상적으로 패치됨

 

리스너 설정

netca 실행

1
$ netca

 

 

Listener configuration 선택

 

 

Add 선택

 

 

리스너 이름 설정

 

 

Next 선택

 

 

포트 설정

 

 

No 선택

 

 

Next 선택

 

 

Finish 선택

 

 

DB 생성

dbca 실행

1
$ dbca

 

 

Next 선택

 

 

Create a Database 선택

 

 

General Purpose 선택

 

 

sid 설정

 

 

EM 체크 해제

 

 

패스워드 설정

 

 

File System 선택

 

 

Uses Database File Locations from Template 선택

 

 

FRA 체크 해제

 

 

Next 선택

 

 

메모리 값 확인

 

 

processes 확인

 

 

Character Set 확인(KO16MSWIN949)

 

 

Dedicated Server Mode 선택

 

 

controlfile, datafile, redo 확인

 

 

controlfile 확인

 

 

datafile 확인

 

 

redo 확인

 

 

DB 생성(Generate Database Creation Scripts 는 선택사항)

 

 

OK 선택

 

 

DB 생성 스크립트 생성 완료, OK 선택

 

 

DB 설치 진행됨

 

 

DB 생성 완료됨 Exit 선택

 

 

sqlplus 접속 후 버전 및 상태 확인

1
2
3
4
5
6
$ sqlplus / as sysdba
SQL> select instance_name, version, status from v$instance;
 
INSTANCE_NAME    VERSION           STATUS
---------------- ----------------- ------------
oracle10         10.2.0.3.0        OPEN

정상적으로 설치됨

 

 

참조 : 

https://docs.oracle.com/cd//B19306_01/install.102/b15675.pdf
https://dataforum.io/display/ORCL/Oracle+Database+10g+R2
https://oracle-base.com/articles/10g/oracle-db-10g-installation-on-rhel-4