· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Oracle11g_For_Gentoo


1. Oracle11g For Gentoo

  • 실행 되는듯.

3. 준비

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

3.1. /opt/oracle/env

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

3.2. 권한

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

3.3. 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 .

3.4. DISPLAY

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

4. 설치

4.1. 실행

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

4.2. 오류

  • 오류가 발생하면 아래를 실행한 후 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


5. init

5.1. /etc/init.d/ora.database

# ----------------------------------------------------------------------
# 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 $?
}

5.2. /etc/init.d/ora.listener

#----------------------------------------------------------------------
# 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 $?
}

5.3. /etc/init.d/ora.console

# ----------------------------------------------------------------------
# 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 $?
}

5.4. chmod

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


5.5. /etc/oratab

  • N 을 Y 로 수정




sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-06-25 20:17:27
Processing time 0.0094 sec