나름 전산인!!

CentOS + Oracle 설치

딩구르르99 2010. 7. 8. 02:56

원본 출처 : http://blog.naver.com/seban21?Redirect=Log&logNo=70082264158

 

 

1. 설치 준비 작업

스왑영역 2GB 이상

/tmp 영역 1GB 이상

설치디렉터리 3GB 이상 공간 필요

 
 
 
 
2. 방화벽 SELinux 는 Disable

 

아래 사이트에서 오라클 다운로드 하고 다운로드 하면서 준비작업 실행
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html

 
 
 
 
3. 오라클 설치용 계정생성
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle

# mkdir -p /u01/app/oracle/product/10.2.0/db_1
# chown -R oracle.oinstall /u01

 

 

 

4. 시스템 파라메터 추가

# vi /etc/sysctl.conf


아래 내용 추가 / 기존내용 주석
# oracle 10g setting
kernel.shmall = 2097152
kernel.shmmax = 2147483648

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

 

# /sbin/sysctl -p
출력 확인

 

# vi /etc/pam.d/login


아래 내용 추가
# oracle 10g setting
session  required  /lib/security/pam_limits.so

 
 

# vi /etc/security/limits.conf


아래 내용 추가
# oracle 10g setting
oracle     soft     nproc     2047
oracle     hard    nproc     16384
oracle     soft     nofile      1024
oracle     hard    nofile      65536

 
 
 

# vi /etc/profile


아래 내용 추가
# oracle 10g setting
if [ $USER = "oracle" ]; then
 ulimit -u 16384 -n 65536
fi

 
 
 
 
5. 시스템 재부팅 후 루트 계정 로그인

# shutdown -r now

 

# vi /etc/redhat-release
아래 내용 추가 / 기존내용 삭제 또는 주석
수정 전 : CentOS release 5.3 (Final)
수정 후 : redhat-4

 
 
 
6. 오라클 사용자 로그온 하여 환경변수 설정

# su - oracle
$ cd ~
$ vi .bash_profile


아래 내용 추가
# oracle 10g setting
TMP=/tmp; export TMP
TMPDIR=$TMP;
export TMPDIR
ORACLE_BASE=/u01/app/oracle;
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;
export ORACLE_HOME
ORACLE_SID=orcl;
export ORACLE_SID
ORACLE_TERM=xterm;
export ORACLE_TERM
PATH=/usr/sbin:$PATH;
export PATH
PATH=$ORACLE_HOME/bin:$PATH;
export PATH
export LANG=C

 

추가후 저장하고 아래 실행

$ source .bash_profile

 
 
 
7. 필수 패키지 설치
# yum install binutils
# yum install compat-libgcc-296
# yum install compat-libstdc++-296
# yum install compat-libstdc++-33
# yum install cpp
# yum install gcc
# yum install gcc-c++
# yum install glibc
# yum install glibc-common
# yum install glibc-devel
# yum install glibc-headers
# yum install ksh
# yum install libaio
# yum install libaio-devel
# yum install libgcc
# yum install libstdc++
# yum install libstdc++-devel
# yum install make
# yum install setarch
# yum install libXp
# yum install openmotif
# yum install unixODBC*

 

 

8. 오라클 압축 풀기

다운 경로 이동후
# unzip 10201_database_linux32.zip
# mkdir /oracle10g
# chmod 755 database
설치 파일 원하는곳에 이동후 설치

 

 

9. 설치 시작

# xhost +
설치는 반드시 oracle 계정으로
# su - oracle

압축 푼곳 이동

$ cd database
$ ./runInstaller

 
 
 
 
10. 오라클 설치

설치 시작하기
http://huikyun.tistory.com/204

 
 
 
 
11. 오라클 서비스 자동시작

# vi /etc/rc.d/rc.local

 

아래 내용 추가
# for oracle 10g
su - oracle -c '/u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start'
su - oracle -c '/u01/app/oracle/product/10.2.0/db_1/bin/dbstart'
su - oracle -c '/u01/app/oracle/product/10.2.0/db_1/bin/isqlplusctl start'

 

# vi /etc/oratab

 

아래에서 끝에 N을 Y로 수정한다.
orcl:/u01/app/oracle/product/10.2.0/db_1:N