Linux/기타

centos 6 에 oracle 10g 10.2.0.1 설치 및 10.2.0.5 patch 작업 - 3

미나리나물 2017. 6. 14. 00:42

9. 10.2.0.5 패치 작업

앞서 oracle 10.2.0.1의 설치는 GUI환경을 이용한 설치를 진행 해 봤다.
이번 oracle 10.2.0.5 패치 설치는 앞과는 다르게 response 파일을 이용한 silent 설치로 진행 해 본다. 해당 설치는 콘솔에서도 가능한 방법이다.

# cd /home/oracle/setup-file/
# unzip 
p8202632_10205_Linux-x86-64.zip -d ./p8202632_10205_Linux-x86-64

(만약 unzip 명령어가 없다고 나오면 # yum install unzip 을 실행해 해당 패키지를 설치 한다)

# chown -R oracle.dba ./p8202632_10205_Linux-x86-64
# su - oracle

$ cd /home/oracle/setup-file/p8202632_10205_Linux-x86-64/Disk1/response
$ vi patchset.rsp

UNIX_GROUP_NAME="dba"

FROM_LOCATION="/home/oracle/setup_file/p8202632_10205_Linux-x86-64/Disk1/stage/products.xml"
(oracle 10.2.0.5 패치파일 압축을 풀어 둔 주소를 입력)

ORACLE_HOME="/home/oracle"

ORACLE_HOME_NAME="OraDb10g_home1"
(최초 설치 시 입력 한 oracle home 이름. 이름을 잘 모르겠다면 /home/oracle/oraInventory/log/에서 install 로그를 확인해본다)

COMPONENT_LANGUAGES={"en,ko"}

DECLINE_SECURITY_UPDATES=true

(해당하는 부분을 찾아 수정해 준다)

 

$ lsnrctl stop                           (리스너 정지)
$ sqlplus / as sysdba                    (패치를 위한 DBMS 정지. 시간이 좀 필요하다)

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 14 09:56:07 2017
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

 

Connected to:
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit;

$ cd /home/oracle/setup-file/p8202632_10205_Linux-x86-64/Disk1
$ ./runInstaller -silent -responseFile /home/oracle/setup-file/p8202632_10205_Linux-x86-64/Disk1/response/patchset.rsp
(response 파일 경로 작성 시 반드시 절대 경로를 사용해야 한다!!)

Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, redhat-6, UnitedLinux-1.0, asianux-1, asianux-2, asianux-3, enterprise-4, enterprise-5 or SuSE-11
                                      Passed

...
...
...

End of install phases.(Wednesday, June 14, 2017 1:42:48 PM KST)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/home/oracle/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

The installation of Oracle Database 10g Release 2 Patch Set 4 was successful.
Please check '/home/oracle/oraInventory/logs/silentInstall2017-06-14_01-41-02PM.log' for more details.

$ exit

# /home/oracle/root.sh            (해당 파일은 반드시 root 계정으로 실행)

Running Oracle 10g root.sh script...
 
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /home/oracle
 
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]: 
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
 
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.
(모두 기본값으로 진행)
 
이로써 업그레이드 설치는 완료 되었다.

 

10. 패치 후 Post Database 업그레이드

패치 후에는 DB를 업그레이드 해야 사용 가능해 진다.

# su - oracle

$ lsnrctl start
$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Wed Jun 14 13:49:19 2017

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup upgrade            (startup만 하면 오류 발생)

SQL> @?/rdbms/admin/catupgrd.sql    (엔진에 맞는 DB 버전으로 패치)

SQL> shutdown immediate;

SQL> startup

SQL> @?/rdbms/admin/utlrp.sql          (Invalid PL/SQL 패키지를 compile 함)

SQL> select status from v$instance;

 

11. 설치 중 각종 오류 해결 방법

./runInstaller: /ORACLE/SetupFiles/database/install/.oui: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

yum install ld-linux.so.2


설치 중 요구 사양 체크에서 아래와 같은 오류가 발생하면(아래 오류는 log파일로 확인 가능하다)

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

                                      Failed <<<<

/etc/redhat-release 내용을 redhat-4 로 변경


아래와 비슷한 오류가 발생 했을 경우 (3940MB의 스왑 공간이 필요한데 현재 1983MB만 사용 가능하다는 의미)

Checking available swap space requirements ...
Expected result: 3940MB
Actual Result: 1983MB
Check complete. The overall result of this check is: Failed <<<<
Problem: The system does not have the required swap space.
Recommendation: Make more swap space available to perform the install.

# dd if=/dev/zero of=/home/oracle/tmpswap bs=1k count=4034560    (마지막 크기는 필요한 만큼의 공간 x 1024를 하면 된다)
# chmod 600 /home/oracle/tmpswap
# mkswap /home/oracle/tmpswap
# swapon /home/oracle/tmpswap
(단 이 명령어를 사용하면 재부팅 시 스왑공간은 없어진다. 재부팅 후에도 스왑공간을 사용하려면 fstab을 이용하도록 한다)


Exception in thread "main" java.lang.UnsatisfiedLinkError:

/tmp/OraInstall2015-06-01_03-31-16PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory

yum install libXp.x86_64 libXt.x86_64 libXp-devel.x86_64 libXt-devel.x86_64 libXp.i686 libXt.i686 libXp-devel.i686 libXt-devel.i686 libXtst.i686 libXtst.i686 libXtst-devel.i686 libXtst-devel.x86_64


GUI에서 runInstaller를 실행했을 때 아래 오류가 나온다면

can't connect to x11 window server using ' 1.0' as the value of the display variable

xhost +        (별도의 터미널 창을 열어서 실행)


설치 중 아래 오류가 나온다면

Error in invoking target 'install' of makefile ....oracle/product/10.2.0/db_1/ctx/lib/ins_ctx.mk

yum install binutils.x86_64 binutils-devel.i686 binutils-devel.x86_64 compat-db.x86_64 compat-db42.x86_64 compat-libstdc++-33.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686  libstdc++-devel.x86_64


설치 중 아래 오류가 나온다면

ERROR INVOKING TARGET 'COLLECTOR' OF MAKEFILE '$O_H/SYSMAN/LIB/INS_EMDB.MK'

"Continue"로 우선 넘긴 다음, 10.2.0.4 또는 10.2.0.5 패치 진행