1. 개요

OHS를 설치해보자.


2. 파일 다운로드

오라클 홈페이지에서 파일 다운로드.

오라클 계정이 필요할 것이다.


3. 사전 작업

3-1. 파일 생성

GUI로 설치하면 모르겠지만 사일런트 모드로 설치하기 위해 필요한 파일이다. 직접 만들어야 한다..

3-1. resp.txt 파일 생성

[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/u01/oracle/ohs/121200
INSTALL_TYPE=Standalone HTTP Server (Managed independently of WebLogic server)
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

3-2. oraInst.loc 생성

inst_group=svcadm
inventory_loc=/u01/oracle/oraInventory

3-2. 필수 패키지 설치

설치하는 서버 환경마다 다른데 나의 경우는 다음과 같은 패키지를 추가로 설치함.

yum install gcc
yum install gcc-c++
yum install libaio
yum install libaio-devel
yum install sysstat
yum install compat-libstdc++-33
yum install compat-libcap1


4. 설치

4-1. 계정 확인

root로 설치하면 에러 발생

# ./ohs_121200_linux64.bin
0%....................................................................................................100%
The user is root.  The Oracle Universal Installer cannot continue installation if the user is root.
The Oracle Universal Installer failed.  Exiting.
** Error during execution, error code = 65280.

 4-2. 설치 (경로 문제)

$ ./ohs_121200_linux64.bin -silent -responseFile resp.txt -invPtrLoc oraInst.loc
0%....................................................................................................100%
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2596.990 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 4095992 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 18533 MB    Passed


Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2019-05-02_01-43-00PM
Invalid inventory pointer file:/tmp/sfx_j6DNvg/Disk1/oraInst.loc
The Oracle Universal Installer failed.  Exiting.

이 에러가 나는 이유는 절대 경로로 지정을 안했기 때문이다.

따라서 이렇게 하면 됨.

$ ./ohs_121200_linux64.bin -silent -responseFile /u01/installer/resp.txt -invPtrLoc /u01/installer/oraInst.loc
0%....................................................................................................100%
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2596.990 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 4095992 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 18533 MB    Passed

 4-3. 설치 ( 패키지 문제)

Checking for binutils-2.20.51.0.2; found binutils-2.20.51.0.2-5.48.el6_10.1-x86_64.     Passed
Checking for compat-libcap1-1.10; Not found.    Failed <<<<
Checking for compat-libstdc++-33-3.2.3-x86_64; Not found.       Failed <<<<
Checking for libgcc-4.4.4-x86_64; found libgcc-4.4.7-23.el6-x86_64.     Passed
Checking for libstdc++-4.4.4-x86_64; found libstdc++-4.4.7-23.el6-x86_64.       Passed
Checking for libstdc++-devel-4.4.4-x86_64; Not found.   Failed <<<<
Checking for sysstat-9.0.4; Not found.  Failed <<<<
Checking for gcc-4.4.4; Not found.      Failed <<<<
Checking for gcc-c++-4.4.4; Not found.  Failed <<<<
Checking for make-3.81; found make-1:3.81-23.el6-x86_64.        Passed
Checking for glibc-2.12-x86_64; found glibc-2.12-1.212.el6-x86_64.      Passed
Checking for glibc-devel-2.12-x86_64; Not found.        Failed <<<<
Checking for libaio-0.3.107-x86_64; Not found.  Failed <<<<
Checking for libaio-devel-0.3.107-x86_64; Not found.    Failed <<<<
Check complete. The overall result of this check is: Failed <<<<

Problem: Some recommended packages are missing (see above).
Recommendation: You may actually have installed packages which have obsoleted these, in which case you can successfully continue with the install. If you have not, it is recommended that you do not continue. Refer to the product release notes to find out how to get the missing packages and update the system.
Error: Check:Packages failed.
Checking for VERSION=2.6.32; found VERSION=2.6.32-279.el6.x86_64.       Passed
Checking for hardnofiles=4096; found hardnofiles=4096.  Passed
Checking for softnofiles=4096; found softnofiles=4096.  Passed
Check complete. The overall result of this check is: Passed
Kernel Check: Success.
Expected result: 1024MB
Actual Result: 7868MB
Check complete. The overall result of this check is: Passed
TotalMemory Check: Success.
Expected result: 1.7
Actual Result: 1.7.0_15
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Prereq failed. Aborting Install
The Oracle Universal Installer failed.  Exiting.
** Error during execution, error code = 256.

(위에서 말한)사전에 필요로 하는 패키지를 다 안깔았기 때문.


5. 도메인 구성

안타깝게도 나는 이 버전에서 도메인 구성까지 silent mode로 할 수 없었다.

참고한 링크는 http://dirknachbar.blogspot.com/2017/04/silent-installation-and-configuration.html 였다.

그런데 /wlserver/common/templates/wls/base_standalone.jar 파일은 아예 없었고, /ohs/common/templates/wls/ohs_standalone_template.jar 파일은 /ohs/common/templates/wls/ohs_standalone_template_12.1.2.jar 으로 대체하였지만 정상적으로 구성되지 않았다.

파이썬 스크립트에서 요구하는 template-info.xml 파일은 ohs_standalone_template_12.1.2.jar 안에 들어있었다.

./ohs/common/templates/wls/ohs_standalone_template_12.1.2.jar
     0 Tue Jun 11 13:24:12 KST 2013 META-INF/
   103 Tue Jun 11 13:24:10 KST 2013 META-INF/MANIFEST.MF
     0 Tue Jun 11 13:06:50 KST 2013 config/
  1066 Wed May 02 04:07:22 KST 2012 config/config.xml
   322 Wed May 01 05:28:20 KST 2013 file-definition.xml
 15159 Sun May 19 15:26:56 KST 2013 startscript.xml
   437 Mon Nov 26 11:44:36 KST 2012 startup-plan.xml
   760 Tue Feb 26 01:31:24 KST 2013 stringsubs.xml
   553 Thu Mar 07 12:05:36 KST 2013 template-info.xml

더 이상 이 버전으로 하긴 어려워서 새로운 OHS 버전을 받아서 테스트하려고 한다.