Post List

2025년 6월 24일 화요일

Oracle Install

Contents

1 다음의 URL에서 CentOS-6.3-x86_64-netinstall.iso 다운로드
2 cd를 넣고
3 호스트명 변경
4 커널매개변수 세팅
5 사용자 리소스 파일
6 SELINUX 해제
7 로그인 설정 파일
8 필수패키지 설치
9 오라클 그룹과 계정
10 설치 디렉토리 생성
11 설치 디렉토리에 계정과 그룹 부여
12 오라클 계정 환경 설정
13 설치는 xwindow에서 진행
14 GUI로 설치화면이 나오면 마우스 뚝딱거리며 설치 -> 설치 완료
15 오라클 자동 시작 설정
16 오라클 시작



1 다음의 URL에서 CentOS-6.3-x86_64-netinstall.iso 다운로드 #

2 cd를 넣고 #

  • Choose a Language:한국어나 영어 선택
  • Keyboard Type: us로 선택
  • Installation Method: URL 선택
  • Configure TCP/IP: DHCP 선택
  • URL setup: http://ftp.daum.net/centos/6.3/os/x86_64 기입
  • 데스크탑(GNOME)은 반드시 설치하자.

3 호스트명 변경 #

vi /etc/hosts

다음을 추가
  192.168.0.200 oraserver

4 커널매개변수 세팅 #

vi /etc/sysctl.conf

다음을 추가
# Controls for Oracle 11g R2
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 = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

주의사항: 아래보다 작으면 더 크게 설정해 주어야 한다.
  • kernel.shmall = 2097152
  • kernel.shmmax = 536870912

저장 후 확인
/sbin/sysctl -p

5 사용자 리소스 파일 #

vi /etc/security/limits.conf

다음을 추가
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

6 SELINUX 해제 #

  • vi /etc/selinux/config
  • SELINUX=enforcing 으로 되어 있다면 SELINUX=disabled 로 변경
  • SELINUX는 보안강화 프로그램([http]참고)

7 로그인 설정 파일 #

vi /etc/pam.d/login

다음을 추가
session    required     pam_limits.so

8 필수패키지 설치 #

yum -y install binutils-2* compat-libstdc++-33* elfutils-libelf* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh* libaio-0.* libaio-devel-0.* libgomp-4.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*

9 오라클 그룹과 계정 #

groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmadmin oracle
passwd oracle

10 설치 디렉토리 생성 #

mkdir -p /opt/oracle/product/11gr2
mkdir -p /opt/oraInventory

11 설치 디렉토리에 계정과 그룹 부여 #

chown -R oracle.oinstall /opt/oracle
chown -R oracle.oinstall /opt/oraInventory
chmod -R 755 /opt/oracle

12 오라클 계정 환경 설정 #


su - oracle
vi .bash_profile

다음을 추가
# Oracle 11g R2 environment
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11gr2; export ORACLE_HOME
ORACLE_SID=ordb; export ORACLE_SID
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/lib:/usr/local/lib; export LD_LIBRARY_PATH

if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
                ulimit -p 16384
                ulimit -n 65536
        else
                ulimit -u 16384 -n 65536
        fi
fi

13 설치는 xwindow에서 진행 #

  • GNOME을 oracle 사용자로 로그인한다.
  • 리눅스 설치할 때 언어를 한글로 설정한 경우 : export LANG=C

su - oracle
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
cd database
./runInstaller


원격으로 설치하는 경우 아래와 같은 에러가 나타날 수 있다.
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 44130 MB Passed
Checking swap space: must be greater than 150 MB. Actual 10047 MB Passed
Checking monitor: must be configured to display at least 256 colors
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

continuing with the installation,

Continue? (y/n) [n] y


Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-03-08_07-23-53PM. Please wait ...oracle@orclserver database$ Exception in thread "main" java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.Toolkit$2.run(Toolkit.java:821)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
at oracle.install.commons.util.Application.startup(Application.java:758)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

원격으로 설치할 때 위의 에러가 발생하면 아래와 같이 실행
root@orclserver ~# xhost +
root@orclserver ~# su - oracle
oracle@orclserver ~# export DISPLAY=192.xxx.xxx.110:0.0 (실제 사용하는 pc의 IP 주소)
oracle@orclserver ~# unzip linux.x64_11gR2_database_1of2.zip
oracle@orclserver ~# unzip linux.x64_11gR2_database_2of2.zip
oracle@orclserver ~# cd database
oracle@orclserver database# ./runInstaller


14 GUI로 설치화면이 나오면 마우스 뚝딱거리며 설치 -> 설치 완료 #

Enterprise Manager Database Control URL - (ordb) :
https://orclserver:1158/em


15 오라클 자동 시작 설정 #

su - oracle
vi /etc/oratab

다음과 같이 수정
ordb:/opt/oracle/product/11gr2:Y

su - root
vi /etc/rc.d/rc.local

다음을 추가
su - oracle -c /opt/oracle/product/11gr2/bin/dbstart
su - oracle -c /opt/oracle/product/11gr2/bin/"lsnrctl start"
su - oracle -c /opt/oracle/product/11gr2/bin/"emctl start dbconsole"

16 오라클 시작 #

su - oracle
lsnrctl start
lsnrctl status
sqlplus "/ as sysdba"
startup
exit
emctl start dbconsole

댓글 없음:

댓글 쓰기