RedHat Enterpirse Linux 6.5 에 Oracle 11g 설치하기
1 설치 시나리오
가) RHEL 6.5 DeskTop 패키지만 설치 후 추가적인 RPM 설치
나) Oracle 11g 구성에 필요한 패키지
binutils
compat-libcap1
compat-libstdc++-33
gcc
gcc-c++
glibc
glibc-devel
ksh
libgcc
libstdc++
libstdc++-devel
libaio
libaio-devel
make
sysstat
다) Oracle 데이터 설치 경로
/app
2 설치에 필요한 Oracle 11g 다운로드 (Oracle 계정 필요)
가) 다운로드 경로
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/
나) 다운로드 파일 (Oracle 11g)
다운로드 하기 전에 라이선스 동의가 필요함 (다운로드 상위에 있음)
Oracle Database 11g Release 2
Standard Edition, Standard Edition One, and Enterprise Edition
(11.2.0.1.0)
Linux x86-64 의 File 1, File 2
linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
3 그룹과 계정 생성 및 Host 등록
가) Install 에 필요한 Oracle 그룹과 계정을 생성한다.
#groupadd oinstall
#groupadd dba
#useradd –g oinstall –G dba oracle
#passwd oracle
/etc/hosts 아래에 Host 정보를 넣어준다.
#vim /hosts
10.10.10.200 200-VM
4 커널 파라미터 설정 (Oracle 11g 기준)
가) 시스템 설정이 제시한 값보다 클 경우는 수정하지 않고 낮은 경우 수정해준다.
수정이 필요하다면 sysctl.conf 에서 수정해준다.
#vim /etc/sysctl.conf
5 Oracle 을 위한 Resource Limits 설정을 변경 해준다.
가) /etc/security/limits.conf 파일 제일 아래에 넣어준다.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
6 Oracle Install 디렉토리 만들기
가) 마운트 포인트가 따로 필요한 경우 지정이 가능하며, 여기서는 디폴트(/app) 경로로 지정했다.
#mkdir –p /app
#chown –R oracle:oinstall /app
#chmod –R 775 /app
7 Oracle 환경 변수 만들기
가) Oracle 환경 변수를 만들어주는데 프롬프트 라인에서 명령어를 입력시켜 주는데 앞으로 계속 사용될 변수 이므로 oracle 계정의 환경 변수에 넣어준다.
ORACLE_BASE=/app/oracle
ORACLE_SID=RHELORA
vim /home/oracle/.basr_profile // 제일 아래에 추가해준다.
export ORACLE_BASE=/app/oracle
export ORACLE_SID=RHELORA
export ORACLE_HOME=/app/oracle/dbhome
export ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl
8 Oracle 설치를 시작해준다
가) Oracle 설치를 시작하는데 터미널에서도 가능하지만, 제가 테스트 해본 경우 터미널에서는 설치가 중단되며, X-Windows 모드에서 설치를 하였다.
나) 2번 에서 받아놓은 Oracle 설치 파일 1번과 2번을 같은 디렉토리로 넣어준 후 해당 디렉토리의 권한을 775 로 맞춰 준다. ( 저는 /usr/local/src/database )
#chmod –R 755 /usr/local/src/database
#export LANG=C
#cd /usr/local/src/database
#./runInstaller
다) >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
오류 발생 시 아래 명령어를 입력 해준다.
xhost +SI:localuser:oracle
9 GUI 설치 시작
가) Configure Security Updates
이메일 보내는 옵션은 체크 해제 하고 Next
나) I Installation Options
Create and configure a database 선택 후 Next
다) System Class
Server Class 선택 후 Next
라) Grid Options
Single Instance database Installation 선택 후 Next
마) Install Type
Advanced Install 선택 후 Next
바) Product Languages
Korean 추가 후 Next
사) Database Edition
Enterprise Edtion 선택 후 Next
아) Installation Location
Software Location 에 /app/oracle/dbhome 으로 수정 후 Next
자) Create Inventory
디폴트 값 그대로 Next
차) Database Indentifiers
Global database name – RHELORA,
Oracle Service Identifier (SID) – RHELORA 수정 후 Next
카) Configuration Options
Memory – Enable Automatic Memory Management 체크
Character sets – Chose from following list of character sets (Unicode standard UTF-8 AL32UTF8)
Security – 패스
Sample Schemas – Create database with sample schemas 체크
Next
타) Management Options
디폴트 값 그대로 Next
파) Backup and Recovery
백업이 필요하다면 Enable automated backups 체크 후 계정&비번 입력
백업이 필요하지 않다면 Do not enable automated backups
Next
하) Schema Passwords
테스트 용도 이므로 모든 계정의 비밀번호를 같게 설정한다.
Use the same password for all accounts 선택 후 계정 과 비번 입력
Next
가) Operating System Groups
Database Administrator (OSDBA) Group - dba
나) Prerequis ite Checks
Oracle 에서 요구하는 패키지들에 대한 체크를 진행 하는 부분, 패키지를 찾지 못해서 Failed 가 떠도, 상위 버전의 패키지가 있다면 ignore All 로 진행해도 문제는 없다.
다) Install Product
최종 설치 진행이 완료되고 Finish 클릭하면 “Database Configuration Assistant” 창이 뜨면서 설치를 마무리 및 설정을 완료가 진행된다.
10 설치 완료 후 실제 로그인 및 DB 확인
#cd /app/oracle/dbhome/bin/
[oracle@200-VM bin]$ ./sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Tue Nov 11 05:15:55 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/app/oracle/oradata/RHELORA/system01.dbf
/app/oracle/oradata/RHELORA/sysaux01.dbf
/app/oracle/oradata/RHELORA/undotbs01.dbf
/app/oracle/oradata/RHELORA/users01.dbf
/app/oracle/oradata/RHELORA/example01.dbf
SQL>
가) 최종 설치 및 확인 완료