본문 바로가기
Linux/서버 구축

Linux Oracle Database 11g 설치 방법(Centos, Redhat)

by 프리윙즈 2022. 9. 3.
728x90
반응형
  1. 오라클 공식 홈페이지에 접속합니다. (https://www.oracle.com/kr)

 

  1.  [지원] 메뉴에서 [평생지원 정책]의 [소프트웨어 다운로드] 메뉴를 클릭합니다.

 

  1.  [Oracle Software Delivery Cloud]를 클릭하여 접속합니다.  (https://edelivery.oracle.com/osdc/faces/Home.jspx)

 

  1. Sign in 눌러 로그인(회원가입 필수)

 

  1. 제품명 검색 설치 진행 "database 11g"검색
  2. 제품 선택 완료 우측 상단에 Continue 눌러 진행
  3. 필요한 파일 선택 Continue 다운로드 진행

 

2. 패키지 확인

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2 
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2

3. Oracle 계정 및 디렉토리 생성

3.1 Oracle 계정 생성

 [relay-db@centos ~]$ groupadd oinstall
 [relay-db@centos ~]$ groupadd dba
 [relay-db@centos ~]$ useradd -m -g oinstall -G dba oracle
 [relay-db@centos ~]$ passwd oracle

3.2 디렉토리 생성

 [relay-db@centos ~]$ mkdir /oracle
 [relay-db@centos ~]$ chown -R oracle.dba /oracle
 [relay-db@centos ~]$ chmod -R 755 /oracle

4. 커널 파라미터 설정

4.1 커널 수정

 [relay-db@centos ~]$ vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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 = 1048586
  • 파일 맨 하단에 추가하되 없는 것만 추가

4.2 커널 수정 내역 적용

 [relay-db@centos ~]$ /sbin/sysctl -p

5. Oracle 사용자 계정 Shell Limit 설정

5.1 /etc/security/limits.conf 파일 수정

 [relay-db@centos ~]$ vi /etc/security/limits.conf
#<domain> <type> <item> <value>
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

5.2 /etc/pam.d/login 파일 수정

 [relay-db@centos ~]$ sudo vi /etc/pam.d/login
session required pam_limits.so
  • 파일 맨 하단에 추가

5.3 SELinux 비활성화

 [relay-db@centos ~]$ vi /etc/selinux/config
SELINUX=disabled
  • 파일 맨 하단에 추가

6. 환경변수

 [relay-db@centos ~]$ sudo vi /home/oracle/.bash_profile
PATH=/usr/sbin:$PATH; export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR;
ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11g; export ORACLE_HOME
ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl; export ORACLE_HOME_LISTNER
ORACLE_SID=ora11; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH;export PATH|
  • 경로와 SID 등은 뒤에 Oracle 설치 시 동일하게 적용되어야 함.

7. 설치

7.1 다운로드한 파일을 oracle 계정으로 FTP 접속하여 서버에 업로드

7.2 oracle 계정으로 변경

 [root@centos ~]$ su - oracle
 Password: 
 [oracle@centos ~]$

7.3 압축 파일 해제

 [oracle@centos ~]$ ls -l
 total 2227312
 rw-rr-. 1 oracle oinstall 1285396902 Apr  4 17:06 linux_11gR2_database_1of2.zip
 rw-rr-. 1 oracle oinstall  995359177 Apr  4 17:06 linux_11gR2_database_2of2.zip
 [oracle@centos ~]$ unzip linux_11gR2_database_1of2.zip
 [oracle@centos ~]$ unzip linux_11gR2_database_2of2.zip
 [oracle@centos ~]$ ls -l
 total 2227316
 drwxr-xr-x. 8 oracle oinstall       4096 Aug 19  2009 database
 rw-rr-. 1 oracle oinstall 1285396902 Apr  4 17:06 linux_11gR2_database_1of2.zip
 rw-rr-. 1 oracle oinstall  995359177 Apr  4 17:06 linux_11gR2_database_2of2.zip

7.4 xhost 설정 원격설치 시

root 로 로그인 후 xclock, xterm 설치 및 원격 PC IP 설정

[root@relay-db ~]# yum install xclock

[root@relay-db ~]# yum install xterm

[root@relay-db ~]# xhost + 10.20.XX.XX

X windows 관련 프로그램 실행 확인

[root@relay-db ~]# xclock 

oracle 계정으로 로그인

[oracle@relay-db database]$ export DISPLAY=10.20.11.119:0.0

한글이 깨짐으로 인한 언어 설정 변경

export LANG=C

7.5 설치프로그램 실행

 [oracle@centos ~]$ cd database
 [oracle@centos database]$ ./runInstaller

 

 

 

 

반응형

댓글