9.2.0.4           9.2.0.7                              9.2.0.8

[ Engine생성  Engine패치  DB생성 → Engine패치업 ] 


Install ORACLE 9i on RHEL3 

      172.16.5.15

      255.255.0.0

      172.16.0.1

      168.126.63.1  

●  Engine 생성전


     - oracle 계정생성 


[root@server114 root]groupadd g 5000 dba

[root@server114 root]# useradd g dba oracle

[root@server114 root]passwd oracle


      


       - winscp 이용해 필요한 설치파일 전송   (window: oracle9i의 install폴더---> linux: /home/oracle 로 전송)



       - 공유메모리 확인


[root@server114 root]# echo '2147483648' > /proc/sys/kernel/shmmax

[root@server114 root]# vi /etc/rc.d/rc.local                                       <- 공유메모리확인 내용 등록함.

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.


touch /var/lock/subsys/local

echo ‘2147483648’ > /proc/sys/kernel/shmmax




- ship_9204_linux_disk 압축풀기


[root@server114 oracle]# cd /home/oracle/install

[root@server114 install]# ll

합계 1570140

drwxr-xr-x    2 root     root         4096  2월 17 15:52 font

drwxr-xr-x    2 root     root         4096  2월 17 15:52 patch

drwxr-xr-x    2 root     root         4096  2월 17 15:54 patchset

drwxr-xr-x    2 root     root         4096  2월 17 15:55 rpm

-rw-r--r--    1 root     root     659577856  3월 25  2004 ship_9204_linux_disk1.cpio

-rw-r--r--    1 root     root     646914048  3월 25  2004 ship_9204_linux_disk2.cpio

-rw-r--r--    1 root     root     299722752  3월 25  2004 ship_9204_linux_disk3.cpio


[root@server114 install]# 

[root@server114 install]# cpio -idmv < ship_9204_linux_disk1.cpio && cpio -idmv < ship_9204_linux_disk2.cpio && 

          cpio -idmv < ship_9204_linux_disk3.cpio




 - font 파일 압축풀기


[root@server114 install]# cd font

[root@server114 font]# tar zxvf baekmuk-ttf-2.1.tar.gz

[root@server114 font]# cp *.ttf  /home/oracle/install/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib/fonts

[root@server114 font]# cp fonts.dir  /home/oracle/install/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib/fonts

[root@server114 font]# cp font.properties.ko /home/oracle/install/Disk1/stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux/lib




 - RPM 설치 (rpm -Uvh libgcj*.rpm 하면 알아서 순서대로 설치해줌)


[root@server114 font]# cd /home/oracle/install/rpm

[root@server114 rpm]# rpm -Uvh compat-libgcj-7.3-2.96.118.i386.rpm

[root@server114 rpm]# rpm -Uvh compat-libgcj-devel-7.3-2.96.118.i386.rpm

[root@server114 rpm]# rpm -Uvh nss_db-compat-2.2-20.i386.rpm                   <--설치시 에러나는 경우 있음 무시.


 

  

 


 - 오라클 계정의 .bash_profile 파일설정. (기존파일에 아래내용을 추가)


[root@server114 rpm]# chown -R oracle.dba /home/oracle

[root@server114 rpm]# su - oracle


[oracle@server114 oracle]$ vi .bash_profile

 

 

 




- bash_profile 수정완료후 root계정으로  su -  해서 9204 압축풀고 패치실행


[oracle@server114 oracle]$  su - 

[root@server114 root]#

[root@server114 root]# cd /home/oracle/install/patch

[root@server114 patch]# ls

9i_opatch_p6880880_101000_LINUX.zip  p3238244_9204_LINUX.zip

p3006854_9204_LINUX.zip              register97.hwp

[root@server114 patch]# unzip p3006854_9204_LINUX.zip

Archive:  p3006854_9204_LINUX.zip

   creating: 3006854/

  inflating: 3006854/rhel3_pre_install.sh

  inflating: 3006854/README.txt

[root@server114 patch]# ls

3006854                              p3006854_9204_LINUX.zip  register97.hwp

9i_opatch_p6880880_101000_LINUX.zip  p3238244_9204_LINUX.zip

[root@server114 patch]# cd 3006854

[root@server114 3006854]# ls

README.txt  rhel3_pre_install.sh

[root@server114 3006854]# sh rhel3_pre_install.sh

Applying patch...

Ensuring permissions are correctly set...

Done.

Patch successfully applied





●  Engine (9.2.0.4) 생성

 

 - 오라클계정으로 다시 로그인 한후 ./runInstaller 실행


 

[oracle@server114 oracle]cd /home/oracle/install/Disk1

[oracle@server114 Disk1]./runInstaller




 OUI  (Oracle Universal Installer) 

1. 시작 - 다음

 



2. 인벤토리 위치 - /home/oracle/oraInventory - 확인

 



3. UNIX 그룹이름 - dba - 다음

 



4. 아래의 창이 뜨면 새로운 터미널열고 root로 # /tmp/orainstRoot.sh 스트립트 실행 - OUI화면으로 돌아와서 계속




5.파일위치 - 자동으로 잡아줌 (오타가 없었다면) - /home/oracle/product/9.2 - 다음

 



6. 사용 가능한 제품 - Oracle9i database 9.2.0.4.0 선택 - 제품언어 눌러서 선택된 언어에 한국어있는지 확인 - 다음 

 



7. 설치유형 - Enterprise Edition - 다음

 



8. Database Configuration - software Only - 다음

 



9. 요약 - 설치

 



10. 아까 열었던 터미널에서 root계정으로 # /home/oracle/product/9.2/root.sh 스크립트 실행 - 확인

 



11. 설치완료

 




12. 설치 확인


[oracle@server114 Disk1]sqlplus /nolog


SQL*Plus: Release 9.2.0.4.0 - Production on Tue Feb 17 17:54:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

Connected to an idle instance.

SQL>

SQL>

SQL> exit                  <-패치전에는 항상 엔진을 종료 해야한다. 

Disconnected


[oracle@server114 Disk1]$





● Engine (9.2.0.7) 패치 


패치전에는 항상 엔진을 종료해야하며, 실행중인 프로세스가 있어도 설치가 안된다. 

실행중인 프로세스 모르겠으면 그냥 재부팅(오라클계정).


- 패치파일 디렉토리로 이동후 압축해제하고 패치실행 


[oracle@server114 Disk1]$ cd /home/oracle/install/patchset

[oracle@server114 patchset]$ unzip p4163445_92070_LINUX.zip

[oracle@server114 patchset]$ cd Disk1


[oracle@server114 Disk1]./runInstaller




 - 패치 시작 화면이 아래화면과 같이 글자 깨진다면 영어로 다시 실행해야함 



 - OUI 종료하고 영어로 다시 실행


[oracle@server114 Disk1]export LANG=C

[oracle@server114 Disk1]./runInstaller




1. 패치시작 - next



2. Specify file locations - Name: OUIHome / Path: /home/oracle/product/9.2 확인 - next

     (   처음에 OUIHome1 로 써있는데 1지우고 아래의 Path줄 클릭하면 경로잡아줌  )



3. Select a product to Install - Oracle 9iR2 Patch Set 9.2.0.7.0 - next



4. Summary  - Install



5. Install

 


6. # /home/oracle/product/9.2/root.sh 스크립트 실행창 뜨면 새 터미널열고 root로 실행후 OUI창 돌아와서 OK.



                                    # /home/oracle/product/9.2/root.sh -> Enter -> y , y, y (overwrite)



7. End of Installation -> Exit



8.  패치(9.2.0.7)확인 -  $  sqlplus  /nolog  

     SQL> exit 


 




● DB생성 (DBCA) :  DataBase Configuration Assistant


 

- 터미널에서 dbca 치면 dbca 창이 뜬다. 5초안에 떠야 정상, 안뜨면 다시 재부팅.


[oracle@server114 oracle]dbca 


      

      

      1. 시작 - 다음

      



       2. 수행하고자 하는 작업 선택 - 데이터베이스 생성 - 다음 

      


       3. 데이터베이스 템플리트 - 범용 (general purpose) 선택 - 다음 

 


       4. 전역 데이터베이스 이름/ SID - testdb - 다음 

     


       

       5. 데이터베이스 접속 옵션 - 전용서버 모드 선택 - 다음 

      


       6. 초기화매게변수 - 상단의 두번째탭 문자집합 - 문자집합목록에서 선택 - KO16MSWIN949 선택 - 다음 

     


7. 데이터베이스 저장 영역 - 다음 

     

             

       8. 생성옵션 - 데이터베이스생성 체크확인 - 다음 

      

     

       9. 요약 - 확인

    

     

     10. DB생성시작
 



       11. SYS, SYSTEM 암호입력 - 종료 (DB생성완료)

       



       - DB생성(9.2.0.7) 확인 


[oracle@server114 oracle]sqlplus /nolog


SQL*Plus: Release 9.2.0.7.0 - Production on Tue Feb 17 19:54:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

Connected.

SQL> select status from v$instance;


STATUS

--------------------------------

OPEN


SQL>


 




● Engine (9.2.0.8) 패치 업

 


9.2.0.7 -> 9.2.0.8로 패치업 하기 위해 DB 접속을 종료, 마찬가지로 실행중인 프로세스 모두 종료해야함.  


STATUS

--------------------------------

OPEN


SQL> shutdown

Database closed. 

Database dismounted.

ORACLE instance shut down.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.7.0 - Production
[oracle@server114 oracle]$ 

 


 - 패치 디렉토리로 이동후 기존의 9.2.0.7 버전 Disk1 디렉토리 삭제하고, 9.2.0.8 패치 압축해제. 


[oracle@server114 oracle]$ cd /home/oracle/install/patchset


[oracle@server114 patchset]rm -fr Disk1

[oracle@server114 patchset]rm -fr README.html


[oracle@server114 patchset]unzip p4547809_92080_LINUX.zip


[oracle@server114 patchset]cd Disk1 

[oracle@server114 Disk1]export LANG=C
[oracle@server114 Disk1]./runInstaller
 

 


1. 패치시작 - 다음



2. Specify File Locations - Name: OUIHome / Path: /home/oracle/product/9.2 확인 - 다음




3. select a product to install - Oracle 9iR2 Patch Set 9.2.0.8.0  - 다음

 


 

4. Summary - install




5.Install 

 



6. 터미널 열어서 root계정으로 스크립트 실행 한후 OUI로 돌아가서 OK.

/home/oracle/product/9.2/root.sh



 

7. End of Installation - Exit




 

- 패치(9.2.0.8)확인 


[oracle@server114 Disk1]sqlplus /nolog


SQL*Plus: Release 9.2.0.8.0 - Production on Tue Feb 17 21:54:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba

Connected to an idle instance





- post upgrade (DB 파라미터 값 수정): db에 접속한 상태(sysdba)에서 진행

 

SQL> startup

ORACLE instance started.


Total  System Global   Area    235999648 bytes

Fixed Size                                      450976 bytes

Variable Size                           201326592 bytes

Database Buffers                      33554432 bytes

Redo Buffers                                 667648 bytes

Database mounted.

Database opend.

SQL> select status from v$instance;


STATUS

--------------------------------

OPEN 


SQL> col COMP_NAEME for a30

SQL> select comp_name, version, status from dba_registry;


                          


                         //확인해보면 아직 모두 (9.2.0.4)버전.



SQL> shutdown

...


SQL> startup migrate

.....

.....


SQL> @?/rdbms/admin/catupgrd.sql           // 엔진에 맞는 DB버전 패치 적용.



 

                  






- 버전 (9.2.0.8) 확인.

 



        엔진에 맞는 DB버전 패치 적용완료.

        



        버전확인 후 shutdown 하고 DB OPEN 확인.


SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit


[oracle@server114 Disk1]sqlplus /nolog


SQL*Plus: Release 9.2.0.8.0 - Production on Tue Feb 17 21:57:33 2015


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


SQL> conn / as sysdba


SQL> startup

Oracle instance started.


Total  System  Global   Area   

....

SQL> select status from v$instance;


STATUS

--------------------------------

OPEN