Skip to main content

Centos에서 Oracle 10G 설치

  1. 패키지 설치

    $> yum -y groupinstall "Desktop" "X Window System" "GNOME Desktop Environment" "Desktop Platform Development" "Desktop Platform"
    $> yum -y install glibc* libaio* compat-libstdc* compat-gcc* gcc* libXp* openmotif* compat-db* xorg-x11-deprecated-libs compat-lib*
    $> yum install kde-i18n-Korean -y
    $> yum install fonts-korean -y
    • Centos 6 64비트만
      $> yum install -y xorg-x11-xauth.x86_64 xorg-x11-apps.x86_64
      $> yum install -y libXp libXtst binutils compat-db compat-libstdc++-33 glibc glibc-devel glibc-headers gcc gcc-c++ libstdc++ cpp make libaio ksh elfutils-libelf sysstat libaio libaio-devel setarch  libXp.i686 libXtst-1.0.99.2-3.el6.i686 glibc-devel.i686 libgcc-4.4.4-13.el6.i686 compat-libstdc++* compat-libf2c* compat-gcc* compat-libgcc* libXt.i686 libXtst.i686
      $> yum install -y glibc-2.12-1.7.el6_0.5.i686
  2. 커널 파라미터 설정
    $> echo "kernel.shmmax = 536870912
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    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" >> /etc/sysctl.conf
    $> sysctl -p
  3. 계정설정
    $> echo "#Oracle setting
    *               soft    nproc   2047
    *               hard    nproc   16384
    *               soft    nofile  1024
    *               hard    nofile  65536" >> /etc/security/limits.conf
    $> echo "session    required     pam_limits.so" >> /etc/pam.d/login
    $> groupadd oinstall
    $> useradd -g oinstall oracle
    $> passwd oracle
    {{ 패스워드 입력 두번 }}
    $> mkdir /usr/local/oracle
    $> chown oracle.oinstall /usr/local/oracle
  4. 설치시 OS정보 변경 수행
    $> mv /etc/redhat-release /etc/redhat-release_ori
    $> echo "redhat-4" > /etc/redhat-release
  5. 시스템 설정 적용
    $> echo "
    # Oracle Settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    ORACLE_BASE=/usr/local/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
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    
    if [ $USER = "oracle" ]; then
      if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
      else
        ulimit -u 16384 -n 65536
      fi
    fi" >> /etc/profile
  6. 시스템 기동시 Oracle 구동을 위한 적용
    echo "
    source /etc/profile
    su - oracle -c \"\$ORACLE_HOME/bin/lsnrctl start\"
    su - oracle -c \"\$ORACLE_HOME/bin/dbstart\"
    " >> /etc/rc.d/rc.local