본문 바로가기
정보관리(데이터베이스, DB)/오라클

[리눅스]Linux(Redhat) 기반 Oracle 11g Express 설치

by 3604 2023. 11. 25.
728x90

출처: [리눅스]Linux(Redhat) 기반 Oracle 11g Express 설치 (tistory.com)

 

Linux(Redhat) 기반 Oracle 11g Express 설치

리눅스에 오라클 설치하는 방법이 저 같은 초보에게는 생각보다 까다롭네요. 다른 블로그들이나 설치 가이드를 찾아보았지만 부족한 거 같아서, 저처럼 헤매시는 분 없도록 설치 방법을 정리해 보았습니다.

 

목차

 

 

 

설치 전체 Process

step1. 요구사항 확인 및 필수 설치 파일 사전 설치

    • 요구사항을 확인한 뒤 yum 명령으로 관련 패키지들을 설치합니다.

step2. 오라클 다운로드

    • wget명령어로 리눅스 OS에 Oracle 11g Express를 다운로드 받습니다.

step3. 그룹 권한 설정

    • 오라클을 설치하려면 사용자 계정이 따로 필요합니다.

step4. 커널 및 자원 제한 설정 (선택)

    • 커널 파라미터 값을 오라클에서 권장한 값으로 바꾸어 줍니다.

step5. 오라클 환경변수 설정

    • 오라클을 설치하기 전에, 오라클 이용을 위하여 사용자 환경 변수를 설정해줍니다..

step6. 오라클 설치

    • 사전 Setting이 끝났으므로, rpm을 이용해 Oracle을 설치해 줍니다.

step7. 오라클 세부 환경 설정

    • listener.ora와 tnsnames.ora를 수정하여 오라클의 세부 환경을 설정합니다.

step8. 오라클 서비스 실행

    • Oracle listener를 실행하여 서비스가 정상 동작하는지 확인해 봅니다.

step9. 테스트

    • sql plus로 관리자 계정으로 접속하여 쿼리를 실행시켜 봅니다.

 

1. 요구사항 확인 및 필수 설치 파일 사전 설치

오라클을 설치하기 이전에, 아래의 요구 사항들을 확인하고 관련 패키지들을 설치해 주어야 합니다.

  (아래 참고1. 패키지 요구사항 볼것)

1. root권한으로 로그인
2. 최소사양 확인
    Minimum: 1 GB of RAM
   Recommended: 2 GB of RAM or more
   1GB of disk space( /tmp directory 위해)

ㅁ 메모리의 용량 확인
$grep MemTotal /proc/meminfo

ㅁ Swap 용량 확인
$grep SwapTotal /proc/meminfo

ㅁ 메모리와 Swap의 사용 가능한 공간 확인
$free

ㅁ 특정 디렉토리의 사용 가능한 공간 확인 (예: TMP)
$df -k /tmp

ㅁ 디스크 여유 공간 확인
$df -k

(1) 사전 필수 설치 패키지 리스트를 확인합니다.

 

(2) 위의 패키지들을 yum을 이용하여 전부 설치합니다.

 

 

 

2. 오라클 다운로드

먼저 http://www.oracle.com/kr/index.html 에 접속하셔서 회원 가입을 하신 후 따라하세요. 여기서 회원 가입 방법은 따로 언급하지 않겠습니다.

따라하기

(1) 웹 브라우저에서 http://www.oracle.com/kr/index.html 에 접속하여 로그인합니다.

(2) http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html 로 이동합니다.

 

(3) Accept License Agreement 에 체크하고, Oracle Database Express Edition 11g Release 2 for Linux x64 링크를 클릭하여 다운로드를 진행합니다.

 

(4) 다운로드를 진행하면 웹 브라우저 하단에 진행 목록이 보이는데, ‘전체 보기’ 를 클릭하여 다운로드 창으로 이동합니다.

 

(5) 현재 다운로드 중인 oracle….rpm.zip 파일의 링크 주소를 복사합니다.

(이 과정이 필요한 이유는, 리눅스에서 wget을 이용해 zip 파일을 다운받기 위하여 링크에 있는 AuthParam 값이 필요하기 때문입니다. 만료시간이 있기 때문에, 링크 주소를 복사한 이후에는 빠르게 (6)의 과정을 진행해야 합니다.)

 

(6) 리눅스로 돌아와서 다운로드할 디렉터리로 이동 후, $ wget [파일명] [링크주소] 명령어를 통해 다운로드를 진행합니다.

 

 

3. 그룹 권한 설정

root 계정으로 oracle 계정과 그룹을 생성해줍니다.

따라하기

$ groupadd oinstall
$ groupadd dba
$ useradd –g oinstall –G dba oracle
$ passwd oracle
 
 
 
 
 

4. 커널 및 자원 제한 설정

커널 파라미터 값을 오라클에서 권장한 값으로 바꾸어 줍니다.

(1) 터미널에서 $ vi /etc/sysctl.conf 를 입력한 후, 파일 제일 아래 쪽에 다음을 입력합니다.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
#kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

(2) :wq를 입력하여 저장 후 vi 에디터에서 빠져 나와 터미널로 복귀합니다.

(3) 자원 제한 설정을 위하여, 터미널에서 $ vi /etc/security/limits.conf 를 입력한 후, 파일 제일 아래 쪽에 다음을 입력합니다.

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

 

(4) 적용을 위해서 reboot 명령어를 통해 리눅스를 재부팅 합니다.

(5) 제대로 설정되었는지 $ /sbin/sysctl –p 로 확인해 봅니다.

 
 
 
 

5. 오라클 환경 변수 설정

오라클을 이용하기 위해서 사용자 환경 변수를 수정합니다.

따라하기

(1) oracle 디렉토리로 이동합니다. $ cd /home/oracle

(2) $ vi .bash_profile 명령어를 입력하여 맨 밑에 아래의 내용을 추가합니다.

ORACLE_BASE=/u01/app/oracle
ORACLE_SID=XE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl
PATH=$ORACLE_HOME/bin:$PATH
export PATH
export ORACLE_BASE
export ORACLE_SID
export ORACLE_HOME
export ORACLE_LISTNER
export TMP=/tmp
export TMPDIR=$TMP
 

(3) bash_profile의 적용을 위해 터미널에서 # source .bash_profile 을 입력합니다.

 
 
 
 

6.오라클 설치

사전 준비가 끝났습니다. 오라클을 설치합니다.

따라하기

(1) 1 과정에서 oracle zip 파일을 다운받은 디렉토리로 이동합니다.

(2) unzip [다운로드 받은 zip 파일명] 명령어를 입력하여 압축을 해제합니다.

(3) 다른 조건을 주지 않은 경우, Disk1이라는 디렉토리가 생성되어 이 디렉토리 안에 압축이 해제됩니다. $ cd Disk1 명령어를 입력하여 Disk1 디렉토리로 이동합니다.

(4) Disk1에 있는 rpm 설치 파일의 설치를 진행합니다.

$ rpm –Uvh oracle11g_express.rpm

설치 절차가 완료되면, /u01/app/oracle 디렉토리에 설치됩니다.

 

<에러 발생시 조치 방안>

*에러 case 1: error : open of …………rpm failed : No such file or directory 오류 

-> 원인 : 해당 파일이 완전히 구성되지 않아서 발생한 문제일 확률이 높습니다. 

-> 해결 방안 : 2. 오라클 다운로드 과정을 다시 진행해 봅니다.

 

*에러 case 2: This system does noet meet the minimum requirments for swap space…

-> 원인 : swap 공간 부족으로 인한 문제입니다. oracle xe 11g에서 필요로 하는 swap 공간은 2048MB, 2GB 입니다. 

-> 해결 방안 : 2048MB의 swap 공간을 정의해 줍니다. 

- $ mkdir /swap 

- $ dd if=/dev/zero of=/swap/swapfile bs=1024 count=2097152 (bscount = swapsize ) 

- $$ cd /swap (반드시 해주어야 함) 

- $$ mkswap swapfile 

- $$ swapon swapfile 

- 이후 다시 경로 이동하여 rpm 설치

 

 

7. 오라클 세부 환경 설정

오라클 설치가 끝났으니, 오라클 세부 환경 설정을 진행합니다.

따라하기

(1) $ cd /u01/app/oracle/product/11.2.0/xe/network/admin

(2) $ vi listener.ora

(3) 아래와 같이 내용을 수정합니다.

SID_LIST_LISTENER = 
  (SID_LIST = 
      (SID_DESC = 
        (SID_NAME = PLSExtProc) 
        (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe) 
        (PROGRAM = extproc) ) 

      (SID_DESC = 
        (GLOBAL_DBNAME = XE) 
        (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe) 
        (SID_NAME = XE) 
        (SERVICE_NAME = XE)
      )
    ) 

    LISTENER = 
      (DESCRIPTION_LIST = 
        (DESCRIPTION = 
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) 
          (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) 
        ) 
      ) 

      DEFAULT_SERVICE_LISTENER = (XE)

(4) $ vi tnsnames.ora

(5) 아래와 같이 내용을 수정합니다.

XE = 
  (DESCRIPTION = 
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) 
    (CONNECT_DATA = 
      (SERVER = DEDICATED) 
      (SERVICE_NAME = XE) 
    ) 
  ) 

  EXTPROC_CONNECTION_DATA = 
    (DESCRIPTION = 
      (ADDRESS_LIST = 
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) 
      ) 
      (CONNECT_DATA = 
        (SID = PLSExtProc) 
        (PRESENTATION = RO) 
      ) 
    )
 
 
 
 

8. 오라클 서비스 실행

오라클 리스너는 네트워크를 이용하여 클라이언트에서 오라클 서버로 연결하기 위한 오라클 네트워크 관리자입니다. 네트워크를 통한 연결은 모두 리스너가 담당합니다. 리스너를 실행시켜 보겠습니다.

따라하기

(1) $ lsnrctl 입력

(2) $ start 입력

(3) $ status 입력 후, 아래 이미지와 같이 Service가 동작하고 있으면, 모든 설치 및 설정이 완료된 것입니다.

 

 
 

9. 테스트

 

3. 그룹 계정 설정에서 ‘oracle’ 이라는 계정을 만들었습니다. 오라클에 접속하기 위해서는 이 계정이 필요합니다. 만약 다른 계정 이름을 생성했다면, 그 계정을 이용해 오라클에 접속해야 합니다.

 

따라하기

(1) $ su oracle 입력하여 oracle 계정으로 전환

(2) $ sqlplus / as sysdba 입력하여 최상의 User로 sql plus 접속

(3) 정삭적으로 쿼리 작성 가능한 상태인지 확인

 

출처: https://pliss.tistory.com/105 [리오집사의 기억저장소:티스토리]

참고1: 패키지 요구사항

Oracle® Database

Quick Installation Guide
11g Release 2 (11.2) for Linux x86-64
E24326-09
September 2017
This guide describes how to quickly install Oracle Database 11g Release 2 (11.2) on Linux x86-64 systems. It includes information about the following:

1 Reviewing Information About This Guide

This guide describes how to install Oracle Database by using the default installation options.
Tasks Described in This Guide
The procedures in this guide describe how to:
  • Configure your system to support Oracle Database
  • Install Oracle Database on a local file system by using the Typical Installation option
  • Configure a general-purpose Oracle Database installation that uses the local file system for database file storage
Results of a Successful Installation
After you successfully install Oracle Database:
  • The database that you created and the default Oracle Net listener process run on the system.
  • Oracle Enterprise Manager Database Control run on the system and can be accessed by using a web browser.
Tasks Not Described in This Guide
This guide covers the Typical Installation scenario and does not describe how to complete the following tasks:
  • Using the Advanced Installation option to install the software
  • Installing the software on a system that has an existing Oracle software installation
  • Installing Oracle Clusterware and Oracle Real Application Clusters on a cluster
  • Enabling Enterprise Manager e-mail notifications or automated backups
  • Enabling core file creation
  • Verifying UDP and TCP kernel parameters
  • Using alternative storage options such as Oracle Automatic Storage Management
  • Installing and configuring Oracle Grid Infrastructure
Where to Get Additional Installation Information
For more information about installing Oracle Database, including information about the tasks not described in this guide, refer to one of the following guides:
All these guides are available on the product disc. To access them, use a web browser to open the welcome.htm file located in the top-level directory of the media. Platform-specific documentation is available in PDF and HTML formats in the Documentation section..

2 Logging In to the System as root

Before you install the Oracle software, you must complete several tasks as the root user. To log in as the root user, complete one of the following procedures:
Note:
You must install the software from an X Window System workstation, an X terminal, or a PC or other system with X server software installed
  • Following are the steps for installing the software from an X Window System workstation or X terminal:
    1. Start a local terminal session, for example, an X terminal (xterm).
    2. If you are not installing the software on the local system, then enter the following command to enable the remote host to display X applications on the local X server:
      For example:
    3. If you are not installing the software on the local system, then use the ssh, rlogin, or telnet command to connect to the system where you want to install the software:
    4. If you are not logged in as the root user, then enter the following command to switch user to root:
  • Following are the steps for installing the software from a PC or other system with X server software:
    Note:
    If necessary, refer to your X server documentation for more information about completing this procedure. Depending on the X server software that you are using, you may have to complete the tasks in a different order.
    1. Start the X server software.
    2. Configure the security settings of the X server software to permit remote hosts to display X applications on the local system.
    3. Connect to the remote system where you want to install the software and start a terminal session on that system, for example, an X terminal (xterm).
    4. If you are not logged in as the root user on the remote system, then enter the following command to switch user to root:

3 Checking the Hardware Requirements

The system must meet the following minimum hardware requirements:

3.1 Memory Requirements

The following are the memory requirements for installing Oracle Database 11g Release 2 (11.2):
  • Minimum: 1 GB of RAM
    Recommended: 2 GB of RAM or more
    To determine the RAM size, enter the following command:
    If the size of the RAM is less than the required size, then you must install more memory before continuing.
  • The following table describes the relationship between installed RAM and the configured swap space recommendation:
    Note:
    On Linux, the HugePages feature allocates non-swappable memory for large page tables using memory-mapped files. If you enable HugePages, then you should deduct the memory allocated to HugePages from the available RAM before calculating swap space.
     
  • To determine whether the system architecture can run the software, enter the following command:
    Note:
    This command displays the processor type. Verify that the processor architecture matches the Oracle software release to install. If you do not see the expected output, then you cannot install the software on this system.
To determine the size of the configured swap space, enter the following command:
If necessary, refer to the operating system documentation for information about how to configure additional swap space.
To determine the available RAM and swap space, enter the following command:
Note:
  • Oracle recommends that you take multiple values for the available RAM and swap space before finalizing a value. This is because the available RAM and swap space keep changing depending on the user interactions with the computer.
  • Contact your operating system vendor for swap space allocation guidance for your server. The vendor guidelines supersede the swap space requirements listed in this guide.
Automatic Memory Management
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on that computer.
To determine the amount of shared memory available, enter the following command:
Note:
MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with HugePages on Linux.

3.2 System Architecture

To determine whether the system architecture can run the software, enter the following command:
Note:
This command displays the processor type. Verify that the processor architecture matches the Oracle software release to install. If you do not see the expected output, then you cannot install the software on this system.

3.3 Disk Space Requirements

The following are the disk space requirements for installing Oracle Database 11g Release 2 (11.2):
  • At least 1 GB of disk space in the /tmp directory
    To determine the amount of disk space available in the /tmp directory, enter the following command:
    If there is less than 1 GB of free disk space available in the /tmp directory, then complete one of the following steps:
    • Delete unnecessary files from the /tmp directory to meet the disk space requirement.
    • Set the TMP and TMPDIR environment variables when setting the oracle user's environment.
      See Also:
      "Configuring the oracle User's Environment" for more information about setting TMP and TMPDIR
    • Extend the file system that contains the /tmp directory. If necessary, contact the system administrator for information about extending file systems.
  • To determine the amount of free disk space on the system, enter the following command:
  • The following tables describe the disk space requirements for software files, and data files for each installation type on Linux x86-64:
     
     
    Additional disk space, either on a file system or on an Oracle Automatic Storage Management disk group is required for the fast recovery area if you choose to configure automated backups.

4 Checking the Software Requirements

Depending on the products that you intend to install, verify that the following software is installed on the system.
Note:
Oracle Universal Installer performs checks on the system to verify that it meets the listed requirements. To ensure that these checks pass, verify the requirements before you start Oracle Universal Installer.
Note:
The platform-specific hardware and software requirements included in this guide were current when this guide was published. However, because new platforms and operating system software versions might be certified after this guide is published, review the certification matrix on the My Oracle Support website for the most up-to-date list of certified hardware platforms and operating system versions:https://support.oracle.com/

4.1 Operating System Requirements

The following or later versions of the operating system are required for Oracle Database 11g Release 2 (11.2):
Note:
  • Starting with Oracle Database 11g Release 2 (11.2.0.4), Oracle Linux 7 and Red Hat Enterprise Linux 7 are supported on Linux x86-64.
  • Starting with Oracle Database 11g Release 2 (11.2.0.3), Oracle Linux 6 and Red Hat Enterprise Linux 6 are supported on Linux x86 and Linux x86-64.
  • Starting with Oracle Database 11g Release 2 (11.2.0.3), Asianux 4 is supported on Linux x86 and Linux x86-64.
  • Starting with Oracle Database 11g Release 2 (11.2.0.4), SUSE Linux Enterprise Server 12 is certified on Linux x86-64 systems.
  • Starting with Oracle Database 11g Release 2 (11.2.0.4), NeoKylin Linux Advanced Server 6 is certified on Linux x86-64 systems.
  • Asianux Server 3 SP2
  • Asianux Server 4 SP3
  • Oracle Linux 4 Update 7
  • Oracle Linux 5 Update 2 (with Red Hat Compatible Kernel)
  • Oracle Linux 5 Update 5
  • Oracle Linux 6
  • Oracle Linux 6 (with Red Hat Compatible Kernel)
  • Oracle Linux 7
  • Oracle Linux 7 (with the Red Hat Compatible Kernel)
  • Red Hat Enterprise Linux 4 Update 7
  • Red Hat Enterprise Linux 5 Update 2
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • SUSE Linux Enterprise Server 10 SP2
  • SUSE Linux Enterprise Server 11
  • SUSE Linux Enterprise Server 12 SP1
  • NeoKylin Linux Advanced Server 6
  • NeoKylin Linux Advanced Server 7
Starting with Oracle Database 11g Release 2 (11.2), the Security Enhanced Linux (SE Linux) feature is supported for Oracle Linux 4, Oracle Linux 5, Oracle Linux 6, Red Hat Enterprise Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 6.
To determine the distribution and version of Linux installed, enter the following command:
# cat /proc/version

4.2 Kernel Requirements

The following are the kernel requirements for Oracle Database 11g Release 2 (11.2):
  • On Oracle Linux 4 and Red Hat Enterprise Linux 4
    2.6.9 or later
  • On Oracle Linux 5 Update 2 with Red Hat Compatible Kernel
    2.6.18 or later
  • On Oracle Linux 5 Update 5 with Red Hat Compatible Kernel
    2.6.18 or later
  • On Oracle Linux 5 Update 5 with Unbreakable Enterprise Kernel
    2.6.32-100.0.19 or later
  • On Oracle Linux 6
    2.6.32-100.28.5.el6.x86_64 or later
  • On Oracle Linux 6 with Red Hat Compatible Kernel
    2.6.32-71.el6.x86_64 or later
  • On Oracle Linux 7
    3.8.13-33.el7uek.x86_64 or later
  • On Oracle Linux 7 with Red Hat Compatible Kernel
    3.10.0-54.0.1.el7.x86_64 or later
  • On Red Hat Enterprise Linux 5 Update 2
    2.6.18 or later
  • On Red Hat Enterprise Linux 5 Update 5
    2.6.18 or later
  • On Red Hat Enterprise Linux 6
    2.6.32-71.el6.x86_64 or later
  • On Red Hat Enterprise Linux 7
    3.10.0-54.0.1.el7.x86_64 or later
  • On Asianux Server 3
    2.6.18 or later
  • On Asianux Server 4
    2.6.32-71.el6.x86_64 or later
  • On SUSE Linux Enterprise Server 10
    2.6.16.21 or later
  • On SUSE Linux Enterprise Server 11
    2.6.27.19 or later
  • On SUSE Linux Enterprise Server 12
    3.12.49-11 or later
  • On NeoKylin Linux Advanced Server 6
    2.6.32-431.el6.x86_64 or later
  • On NeoKylin Linux Advanced Server 7
    3.10.0-327.el7.x86_64 or later
To determine whether the required kernel is installed, enter the following command:
The following is a sample output displayed by running this command on an Oracle Linux 5.0 system:
In this example, the output shows the kernel version (2.6.18) and errata level (-128.el5PAE) on the system.
If the kernel version does not meet the requirement specified earlier in this section, then contact the operating system vendor for information about obtaining and installing kernel updates.

4.3 Package Requirements

The following are the list of packages required for Oracle Database 11g Release 2 (11.2):
Note:
  • Oracle recommends that you install your Linux operating system with the default software packages (RPMs), unless you specifically intend to perform a minimal installation, and follow the directions for performing such an installation to ensure that you have all required packages for Oracle software.
  • Oracle recommends that you do not customize RPMs during a default operating system installation. A default installation includes most required packages, and helps you to limit manual checks of package dependencies.
  • If you did not perform a default Linux installation, you intend to use LDAP, and you want to use the scripts odisrvreg, oidca, or schemasync, then install the Korn shell RPM for your Linux distribution.
  • You must install the packages (or later versions) listed in the following table. Also, ensure that the list of RPMs and all the prerequisites for these RPMs are installed.
  • If you are using Oracle Unbreakable Enterprise Kernel, then all required kernel packages are installed as part of the Oracle Unbreakable Enterprise Kernel installation.
  • For Orace Linux 6 the Oracle Validated RPM has been replaced by the Oracle RDBMS Server 11gR2 Pre-install RPM. See the "Completing a Minimal Linux Installation" section in Oracle Database Installation Guide.
Note:
Starting with Oracle Database 11g Release 2 (11.2.0.2), all the 32-bit packages, except for gcc-32bit-4.3, listed in the following table are no longer required for installing a database on Linux x86-64. Only the 64-bit packages are required.However, for any Oracle Database 11g release before 11.2.0.2, both the 32-bit and 64-bit packages listed in the following table are required.
  • The following or later version of packages for Oracle Linux 4 and Red Hat Enterprise Linux 4 must be installed:
  • The following or later version of packages for Oracle Linux 5, Red Hat Enterprise Linux 5, and Asianux Server 3 must be installed:
  • The following or later version of packages for Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4 must be installed:
  • The following or later version of packages for Oracle Linux 7, and Red Hat Enterprise Linux 7 must be installed:
  • The following or later version of packages for SUSE Linux Enterprise Server 10 must be installed:
  • The following or later version of packages for SUSE Linux Enterprise Server 11 must be installed:
  • The following or later version of packages for SUSE Linux Enterprise Server 12: must be installed:
    Note:
    You must download and install patch 18370031. For more information about how to download and install this patch, see:https://support.oracle.com/
    Oracle Database Client Installation Guide for Linux
  • The following or later version of packages for NeoKylin Linux Advanced Server 6 must be installed:
  • The following or later version of packages for NeoKylin Linux Advanced Server 7 must be installed:
To determine whether the required packages are installed, enter commands similar to the following:
If a package is not installed, then install it from the Linux distribution media or download the required package version from the Linux vendor's website.

4.4 Compiler Requirements

Intel C++ Compiler 10.1 or later and the version of GNU C and C++ compilers listed under "Package Requirements" are supported with these products.
Note:
Intel Compiler v10.1 can be used only with the standard template libraries of the gcc versions mentioned in the Package Requirements section, to build Oracle C++ Call Interface (OCCI) applications.Oracle XML Developer's Kit is supported with the same compilers as OCCI.

4.5 Additional Software Requirements

Depending on the components you want to use, you must ensure that the following software are installed:

4.5.1 Oracle ODBC Drivers

You should install ODBC Driver Manager for UNIX. You can download and install the Driver Manager from the following URL:
http://www.unixodbc.org
To use ODBC, you must also install the following additional ODBC RPMs, depending on your operating sytem:
  • On Oracle Linux 4 and Red Hat Enterprise Linux 4:
    • unixODBC-2.2.11 (32-bit) or later
    • unixODBC-devel-2.2.11 (64-bit) or later
    • unixODBC-2.2.11 (64-bit) or later
  • On Oracle Linux 5, Red Hat Enterprise Linux 5, and Asianux Server 3:
    • unixODBC-2.2.11 (32-bit) or later
    • unixODBC-devel-2.2.11 (64-bit) or later
    • unixODBC-2.2.11 (64-bit) or later
  • On Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4:
    • unixODBC-2.2.14-11.el6 (x86_64) or later
    • unixODBC-2.2.14-11.el6.i686 or later
    • unixODBC-devel-2.2.14-11.el6 (x86_64) or later
    • unixODBC-devel-2.2.14-11.el6.i686 or later
  • On Oracle Linux 7, and Red Hat Enterprise Linux 7:
    • unixODBC-2.3.1-6.el7.x86_64 or later
    • unixODBC-2.3.1-6.el7.i686 or later
    • unixODBC-devel-2.3.1-6.el7.x86_64 or later
    • unixODBC-devel-2.3.1-6.el7.i686 or later
  • On SUSE 10:
    • unixODBC-32 bit-2.2.11 (32-bit) or later
    • unixODBC-2.2.11 (64-bit) or later
    • unixODBC-devel-2.2.11 (64-bit) or later
  • On SUSE 11:
    • unixODBC-2.2.12 or later
    • unixODBC-devel-2.2.12 or later
    • unixODBC-32bit-2.2.12 (32-bit) or later
  • On NeoKylin Linux Advanced Server 6:
    • unixODBC-2.2.14-12.el6_3.i686 or later
    • unixODBC-2.2.14-12.el6_3.x86_64 or later
    • unixODBC-devel-2.2.14-12.el6_3.i686 or later
  • On NeoKylin Linux Advanced Server 7:
    • unixODBC-2.3.1-11.el7.i686 or later
    • unixODBC-2.3.1-11.el7.x86_64 or later
    • unixODBC-devel-2.3.1-11.el7.x86_64 or later

4.5.2 Oracle JDBC/OCI Drivers

Use JDK 6 (Java SE Development Kit 1.6.0_21) or JDK 5 (1.5.0_24) with the JNDI extension with the Oracle Java Database Connectivity and Oracle Call Interface drivers. However, these are not mandatory for the database installation. Note that IBM JDK 1.5 is installed with this release.

4.5.3 Linux-PAM Library

Install the latest Linux-PAM (Pluggable Authentication Modules for Linux) library to enable the system administrator to choose how applications authenticate users.

4.5.4 Oracle Messaging Gateway

Oracle Messaging Gateway supports the integration of Oracle Streams Advanced Queuing (AQ) with the following software:
  • IBM WebSphere MQ V7.0, client and server:
  • TIBCO Rendezvous 7.3
If you require a CSD for WebSphere MQ, then refer to the IBM website for download and installation information:
http://www.ibm.com/

4.5.5 Programming Languages

The following products are certified for use with:
  • Pro* COBOL
    Micro Focus Server Express 5.1

4.5.6 Browser Requirements

You do not require a web browser to install Oracle Database. However, browsers are required to access documentation, and if you intend to use Oracle Enterprise Manager Database Control and Oracle Application Express. Web browsers must support JavaScript, and the HTML 4.0 and CSS 1.0 standards.
Oracle Enterprise Manager Database Control supports the following browsers:
  • Microsoft Internet Explorer 10.0 (supports Oracle Enterprise Manager Database Control 11.2.0.3 and higher)
  • Microsoft Internet Explorer 9.0
  • Microsoft Internet Explorer 8.0
  • Microsoft Internet Explorer 7.0 SP1
  • Microsoft Internet Explorer 6.0 SP2
  • Firefox 21.0 (supports Oracle Enterprise Manager Database Control 11.2.0.4)
  • Firefox 17.0.6 ESR (supports Oracle Enterprise Manager Database Control 11.2.0.4)
  • Firefox 3.6
  • Firefox 3.5
  • Firefox 3.0.7
  • Firefox 2.0
  • Safari 4.0.x
  • Safari 3.2
  • Safari 3.1
  • Google Chrome 27.0 (supports Oracle Enterprise Manager Database Control 11.2.0.4)
  • Google Chrome 4.0
  • Google Chrome 3.0
  • Netscape Navigator 9.0
  • Netscape Navigator 8.1

5 Creating Required Operating System Groups and Users

The following local operating system groups and users are required if you are installing Oracle Database:
  • The Oracle Inventory group (typically, oinstall)
  • The OSDBA group (typically, dba)
  • The Oracle software owner (typically, oracle)
  • The OSOPER group (optional. Typically, oper)
To determine whether these groups and users exist, and if necessary, to create them, follow these steps:
  1. To determine whether the oinstall group exists, enter the following command:
    If the output of this command shows the oinstall group name, then the group exists.
    If the oraInst.loc file exists, then the output from this command is similar to the following:
    The inst_group parameter shows the name of the Oracle Inventory group, oinstall.
  2. To determine whether the dba group exists, enter the following command:
    If the output from this commands shows the dba group name, then the group exists.
  3. If necessary, enter the following commands to create the oinstall and dba groups:
  4. To determine whether the oracle user exists and belongs to the correct groups, enter the following command:
    If the oracle user exists, then this command displays information about the groups to which the user belongs. The output should be similar to the following, indicating that oinstall is the primary group and dba is a secondary group:
  5. If necessary, complete one of the following actions:
    • If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command:
    • If the oracle user does not exist, enter the following command to create it:
      This command creates the oracle user and specifies oinstall as the primary group and dba as the secondary group.
  6. Enter the following command to set the password of the oracle user:

6 Configuring Kernel Parameters and Resource Limits

Verify that the kernel parameters shown in the following table are set to values greater than or equal to the minimum value shown. The procedure following the table describes how to verify and set the values.
Note:
The kernel parameter and shell limit values in this section are minimum values only. For production database systems, Oracle recommends that you tune these values to optimize the performance of the system. Refer to your operating system documentation for more information about tuning kernel parameters.
 
Note:
If the current value of any parameter is higher than the value listed in this table, then do not change the value of that parameter.
To view the current value specified for these kernel parameters, and to change them if necessary:
  • Enter commands similar to the following to view the current values of the kernel parameters:
    Note:
    Make a note of the current values and identify any values that you must change.
     
  • If the value of any kernel parameter is different from the recommended value, then complete the following steps:
    1. Using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following:
      Note:
      Include lines only for the kernel parameter values to change. For the semaphore parameters (kernel.sem), you must specify all four values. However, if any of the current values are larger than the minimum value, then specify the larger value.
      By specifying the values in the /etc/sysctl.conf file, they persist when you restart the system. However, on SUSE Linux Enterprise Server systems, enter the following command to ensure that the system reads the /etc/sysctl.conf file when it restarts:
    2. Enter the following command to change the current values of the kernel parameters:
      Review the output from this command to verify that the values are correct. If the values are incorrect, edit the /etc/sysctl.conf file, then enter this command again.
    3. Enter the command /sbin/sysctl -a to confirm that the values are set correctly.
    4. On SUSE systems only, enter the following command to cause the system to read the /etc/sysctl.conf file when it restarts:
    5. On SUSE systems only, you must enter the GID of the oinstall group as the value for the parameter /proc/sys/vm/hugetlb_shm_group. Doing this grants members of oinstall a group permission to create shared memory segments.
      For example, where the oinstall group GID is 501:
      After running this command, use vi to add the following text to /etc/sysctl.conf, and enable the boot.sysctl script to run on system restart:
      Note:
      Only one group can be defined as the vm.hugetlb_shm_group.
    6. After updating the values of kernel parameters in the /etc/sysctl.conf file, either restart the computer, or run the command sysctl -p to make the changes in the /etc/sysctl.conf file available in the active kernel memory.
Check Resource Limits for the Oracle Software Installation Users
On Oracle Linux systems, Oracle recommends that you install Oracle Preinstallation RPMs to meet preinstallation requirements like configuring your operating system to set the resource limits in the limits.conf file. Oracle Preinstallation RPM only configures the limits.conf file for the oracle user. If you are implementing Oracle Grid Infrastructure job role separation, then copy the values from the oracle user to the grid user in the limits.conf file.
For each installation software owner, check the resource limits for installation, using the following recommended ranges:
Table 1 Installation Owner Resource Limit Recommended Ranges

To check resource limits:
  1. Log in as an installation owner.
  2. Check the soft and hard limits for the file descriptor setting. Ensure that the result is in the recommended range. For example:
  3. Check the soft and hard limits for the number of processes available to a user. Ensure that the result is in the recommended range. For example:
  4. Check the soft limit for the stack setting. Ensure that the result is in the recommended range. For example:
  5. Repeat this procedure for each Oracle software installation owner.
If necessary, update the resource limits in the /etc/security/limits.conf configuration file for the installation owner. However, note that the configuration file is distribution specific. Contact your system administrator for distribution specific configuration file information.
Note:
If the grid or oracle users are logged in, then changes in the limits.conf file do not take effect until you log these users out and log them back in. You must do this before you use these accounts for installation.

7 Creating Required Directories

Create directories with names similar to the following, and specify the correct owner, group, and permissions for them:
  • The Oracle base directory
  • An optional Oracle data file directory
The Oracle base directory must have 3 GB of free disk space, or 4 GB of free disk space if you choose not to create a separate Oracle data file directory.
Note:
If you do not want to create a separate Oracle data file directory, then you can install the data files in a subdirectory of the Oracle base directory. However, this is not recommended for production databases.
To create the Oracle base directory:
  1. Enter the following command to display information about all mounted file systems:
    This command displays information about all the file systems mounted on the system, including:
    • The physical device name
    • The total amount, used amount, and available amount of disk space
    • The mount point directory for that file system
  2. From the display, identify either one or two file systems that meet the disk space requirements mentioned earlier in this section.
  3. Note the name of the mount point directory for each file system that you identified.
  4. Enter commands similar to the following to create the recommended subdirectories in the mount point directory that you identified and set the appropriate owner, group, and permissions on them:
    For example:

8 Configuring the oracle User's Environment

You run Oracle Universal Installer from the oracle account. However, before you start Oracle Universal Installer, you must configure the environment of the oracle user. To configure the environment, you must:
  • Set the default file mode creation mask (umask) to 022 in the shell startup file.
  • Set the DISPLAY environment variable.
To set the oracle user's environment:
  1. Start a new terminal session, for example, an X terminal (xterm).
  2. Enter the following command to ensure that X Window applications can display on this system:
    For example:
  3. If you are not logged in to the system where you want to install the software, then log in to that system as the oracle user.
  4. If you are not logged in as the oracle user, then switch user to oracle:
  5. To determine the default shell for the oracle user, enter the following command:
  6. To run the shell startup script, enter one of the following commands:
    • Bash shell:
    • Bourne or Korn shell:
    • C shell:
  7. If you are not installing the software on the local computer, then run the following command on the remote computer to set the DISPLAY variable:
    • Bourne, Bash or Korn shell:
    • C shell:
    In this example, local_host is the host name or IP address of the local computer to use to display Oracle Universal Installer.
    Run the following command on the remote computer to check if the shell and the DISPLAY environmental variable are set correctly:
    Now to enable X applications, run the following commands on the local computer:
    To verify that X applications display is set properly, run a X11 based program that comes with the operating system such as xclock:
    In this example, you can find xclock at /usr/X11R6/bin/xclocks. If the DISPLAY variable is set properly, then you can see xclock on your computer screen.
    See Also:
    PC-X Server or operating system vendor documents for further assistance
  8. If you determined that the /tmp directory has less than 1 GB of free disk space, then identify a file system with at least 1 GB of free space and set the TMP and TMPDIR environment variables to specify a temporary directory on this file system:
    1. To determine the free disk space on each mounted file system use the following command:
    2. If necessary, enter commands similar to the following to create a temporary directory on the file system that you identified, and set the appropriate permissions on the directory:
    3. Enter commands similar to the following to set the TMP and TMPDIR environment variables:
      • Bourne, Bash, or Korn shell:
      • C shell:
  9. Enter commands similar to the following to set the ORACLE_BASE and ORACLE_SID environment variables:
    • Bourne, Bash, or Korn shell:
    • C shell:
    In this example, /u01/app/oracle is the Oracle base directory that you created or identified earlier and sales is the database name (typically no more than five characters).
  10. Enter the following commands to ensure that the ORACLE_HOME and TNS_ADMIN environment variables are not set:
    • Bourne, Bash, or Korn shell:
    • C shell:
    Note:
    If the ORACLE_HOME environment variable is set, then Oracle Universal Installer uses the value that it specifies as the default path for the Oracle home directory. However, if you set the ORACLE_BASE environment variable, then Oracle recommends that you unset the ORACLE_HOME environment variable and choose the default path suggested by Oracle Universal Installer.

9 Mounting the Product Disc

On most Linux systems, the disk mounts automatically when you insert it into the installation media. If the disk does not mount automatically, then follow these steps to mount it:
  1. Enter a command similar to the following to eject the currently mounted disc, then remove it from the drive:
    • Asianux, Oracle Linux, and Red Hat Enterprise Linux:
    • SUSE Linux Enterprise Server:
    In these examples, /mnt/dvd and /media/dvd are the mount point directories for the disc drive.
  2. Insert the DVD into the disc drive.
  3. To verify that the disc mounted automatically, enter a command similar to the following:
    • Asianux, Oracle Linux, and Red Hat Enterprise Linux:
    • SUSE Linux Enterprise Server:
  4. If this command fails to display the contents of the disc, then enter a command similar to the following:
    • Asianux, Oracle Linux, and Red Hat Enterprise Linux:
    • SUSE Linux Enterprise Server:
    In these examples, /mnt/dvd and /media/dvd are the mount point directories for the disc drive.

10 Installing Oracle Database

After configuring the oracle user's environment, start Oracle Universal Installer and install Oracle Database as follows:
  1. To start Oracle Universal Installer, enter the following command:
    If Oracle Universal Installer does not start, then refer to Oracle Database Installation Guide for Linux for information about how to troubleshoot X Window display problems.
  2. The following table describes the recommended action for each Oracle Universal Installer screen. Use the following guidelines to complete the installation:
    • If you need more assistance, or to choose an option that is not the default, then click Help for additional information.
    • If you encounter errors while installing or linking the software, then refer to Oracle Database Installation Guide for Linux for information about troubleshooting.
    Note:
    If you have completed the tasks listed previously, then you can complete the installation by choosing the default values on most screens.
     

11 Installing Oracle Database Examples

If you plan to use the following products or features, then download and install the products from the Oracle Database Examples media:
  • Oracle JDBC Development Drivers
  • Oracle Database Examples
  • Various Oracle product demonstrations
For information about installing software and various Oracle product demonstrations from the Oracle Database Examples media, refer to Oracle Database Examples Installation Guide.

12 What to Do Next?

To become familiar with this release of Oracle Database, it is recommended that you complete the following tasks:
  • Log in to Oracle Enterprise Manager Database Control using a web browser.
    Oracle Enterprise Manager Database Control is a web-based application that you can use to manage a single Oracle Database installation. The default URL for Database Control is similar to the following:
    To log in, use the user name SYS and connect as SYSDBA. Use the password that you specified for this user during the Oracle Database 11g installation.
  • Refer to Oracle Database Installation Guide for Linux for information about required and optional postinstallation tasks, depending on the products to use.
  • Refer to Oracle Database Installation Guide for Linux for information about how to use Database Control to learn about the configuration of your installed database.
  • To learn more about using Oracle Enterprise Manager Database Control to administer a database, refer to Oracle Database 2 Day DBA.
    This guide, designed for new Oracle DBAs, describes how to use Database Control to manage all aspects of an Oracle Database installation. It also provides information about how to enable e-mail notifications and automated backups, which you might not have configured during the installation.

13 Additional Information

This section contains information about the following:
Product Licenses
You are welcome to install and evaluate the products included in this media pack for 30 days under the terms of the Trial License Agreement. However, you must purchase a program license if you want to continue using any product after the 30 day evaluation period. See the following section for information about purchasing program licenses.
Purchasing Licenses and Version Updates
You can purchase program licenses and updated versions of Oracle products from the Oracle Store website:
https://shop.oracle.com
Contacting Oracle Support Services
If you have purchased Oracle Product Support, you can call Oracle Support Services for assistance 24 hours a day, seven days a week. For information about purchasing Oracle Product Support or contacting Oracle Support Services, go to the Oracle Support Services website:
http://www.oracle.com/us/support/index.html
Locating Product Documentation
Product documentation includes information about configuring, using, or administering Oracle products on any platform. The product documentation for Oracle Database products is available in both HTML and PDF formats online:
http://docs.oracle.com/

14 Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Oracle Database Quick Installation Guide, 11g Release 2 (11.2) for Linux x86-64
E24326-09
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.
728x90