Oracle11g For Gentoo

Gentoo Korea Wiki
Onionmixer (토론 | 기여)님의 2013년 3월 19일 (화) 19:52 판 (Oracle11g For Gentoo 페이지 추가)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
둘러보기로 가기 검색하러 가기
Oracle11g For Gentoo


Oracle11g For Gentoo

  • 실행 되는듯.


참고


준비

mkdir /opt/oracle/oraInventory -p
groupadd dba
groupadd oinstall
useradd -m oracle -g oinstall -G dba -s /bin/bash -d /opt/oracle


/opt/oracle/env

#!/bin/bash
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/11.1.0.6.0
export ORACLE_SID=orcl11
export ORACLE_OWNER=oracle
export oraInventory=$ORACLE_HOME/oraInventory
export PATH=$PATH:$ORACLE_HOME/bin
export LANG=C
export LC_ALL=C


권한

cd /opt/oracle
chown -R oracle:oinstall .


libstdc++.so.6

  • 링크가 잘못되어 있다.
cd /usr/lib64
ln -sf /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/libstdc++.so.6 .
cd /usr/lib32
ln -sf /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/32/libstdc++.so.6 .


DISPLAY

  • 설치할 때만 필요하다.
  • startx 에서 -no-listen tcp 를 뺀다. (X 재시동 필요)
    xhost +


설치

실행

  • 압축해제
su - oracle
cd unzipped directory
source /opt/oracle/env
export DISPLAY=:0.0
./runInstaller -ignoreSysPrereqs


오류

  • 오류가 발생하면 아래를 실행한 후 Retry 를 한다.
  • 절대 GUI 를 종료하지 않는다.
cd $ORACLE_HOME
sed -ie 's/$/ -lrt/' lib/sysliblist
sed -ie 's/$/ -lrt/' lib32/sysliblist
perl -pi -e 's/(LDFLAGS32=.*?@)/$1 -L\/usr\/lib32/g' ctx/lib/env_ctx.mk
perl -pi -e 's/(REDEFINES32=.*?@)/$1 -L\/usr\/lib32/g' rdbms/lib/env_rdbms.mk
perl -pi -e 's/(LD="gcc.*?relax)/$1 ${USRLIB32}/g' bin/genclntsh
perl -pi -e 's/(LD="gcc.*?relax)/$1 \${USRLIB32}/g' bin/genclntsh
perl -pi -e 's/(NON64_LDOPT=\n)/$1USRLIB32=\n/g' bin/genagtsh
perl -pi -e 's/(NON64_LDOPT=.*?"\n)/$1USRLIB32=-L\/usr\/lib32\n/g' bin/genagtsh
perl -pi -e 's/(LD="gcc.*?shared)/$1 \${USRLIB32}/g' bin/genagtsh
bin/relink all


init

/etc/init.d/ora.database

#!/sbin/runscript
# ----------------------------------------------------------------------
# File:    /etc/init.d/ora.database
# Purpose:  Startup Oracle Database(s) defined in /etc/oratab
# ----------------------------------------------------------------------

depend() {
	use logger
    need net hostname clock
}

start() {
	source /opt/oracle/env

    if [ ! -f $ORACLE_HOME/bin/dbstart ]
    then
        ewarn "Oracle not started (no dbstart script)"
        return 1
    fi

    ebegin "Starting Oracle"
    /bin/su - $ORACLE_OWNER -c "source /opt/oracle/env; $ORACLE_HOME/bin/dbstart" >> /dev/null
    eend $?
}

stop() {
	source /opt/oracle/env

    if [ ! -f $ORACLE_HOME/bin/dbshut ]
    then
        ewarn "Oracle not stopped (no dbshut script)"
        return 1
    fi

    ebegin "Stopping Oracle"
    /bin/su - $ORACLE_OWNER -c "source /opt/oracle/env; $ORACLE_HOME/bin/dbshut" >> /dev/null
    eend $?
}


/etc/init.d/ora.listener

#!/sbin/runscript
#----------------------------------------------------------------------
# file /etc/init.d/ora.listener
# Startup Oracle Listeners
# ----------------------------------------------------------------------

depend() {
    need net
    after ora.database
}

start() {
	source /opt/oracle/env
    ebegin "Start Oracle Listeners"
    /bin/su $ORACLE_OWNER -c "source /opt/oracle/env; $ORACLE_HOME/bin/lsnrctl start LISTENER" >> /dev/null
    eend $?
}

stop() {
	source /opt/oracle/env
    ebegin "Stopping Oracle Listeners"
    /bin/su $ORACLE_OWNER -c "source /opt/oracle/env; $ORACLE_HOME/bin/lsnrctl stop LISTENER" >> /dev/null
    eend $?
}


/etc/init.d/ora.console

#!/sbin/runscript
# ----------------------------------------------------------------------
# File:    /etc/init.d/ora.console
# Purpose:  Startup Oracle Enterprise Manager DB Console and ISQL
# ----------------------------------------------------------------------

depend() {
    need net
    after ora.listener
}

start() {
	source /opt/oracle/env
    ebegin "Start Oracle Enterprise Manager DB Console"
    /bin/su $ORACLE_OWNER -c "source /opt/oracle/env; $ORACLE_HOME/bin/emctl start dbconsole" >> /dev/null
    #/bin/su $ORACLE_OWNER -c "$ORACLE_HOME/bin/isqlplusctl start"
    eend $?
}

stop() {
	source /opt/oracle/env
    ebegin "Stopping Oracle Enterprise Manager DB Console"
    /bin/su $ORACLE_OWNER -c "source /opt/oracle/env; $ORACLE_HOME/bin/emctl stop dbconsole" >> /dev/null
    #/bin/su $ORACLE_OWNER -c "$ORACLE_HOME/bin/isqlplusctl stop"
    eend $?
}


chmod

chmod +x /etc/init.d/ora.*


/etc/oratab

  • N 을 Y 로 수정


web interface