【安裝】RedHat 5.1 部署Oracle 10.2.0.1

secooler發表於2009-06-24
# rpm -q gcc make binutils libXp-1 openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel

gcc-4.1.2-14.el5
make-3.81-1.1
binutils-2.17.50.0.6-5.el5
package libXp-1 is not installed
package openmotif is not installed
setarch-2.0-1.1
package compat-db is not installed
package compat-gcc is not installed
package compat-gcc-c++ is not installed
package compat-libstdc++ is not installed
package compat-libstdc++-devel is not installed


# cd /media/RHEL_5.1/x86_64/DVD/Server/

# rpm -ivh setarch-2*
# rpm -ivh make-3*
# rpm -ivh glibc-2*
# rpm -ivh libaio-0*
# rpm -ivh compat-libstdc++-33-3*
# rpm -ivh compat-gcc-34-3*
# rpm -ivh compat-gcc-34-c++-3*
# rpm -ivh libXp-1*
# rpm -ivh openmotif-2*
# rpm -ivh compat-db-4*

------------------------------------------------------------------------
# vi /etc/sysctl.conf
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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/security/limits.conf
*     soft      nproc          2047
*     hard      nproc         16384
*     soft      nofile         1024
*     hard      nofile        65536

------------------------------------------------------------------------
# vi /etc/pam.d/login
session    required     /lib/security/pam_limits.so

------------------------------------------------------------------------
# vi /etc/selinux/config
SELINUX=disabled
#SELINUXTYPE=targeted(登出該行)
SELINUXTYPE=disabled

------------------------------------------------------------------------
# groupadd oinstall
# groupadd dba
# groupadd oper
# useradd -m -g oinstall -G dba oracle
# passwd oracle
輸入密碼:oracle

------------------------------------------------------------------------
# mkdir -p /oracle/app/oracle/product/10.2.0/db_1
# chown -R oracle:oinstall /oracle
# chmod -R 775 /oracle

------------------------------------------------------------------------
# vi /etc/redhat-release
點選insert後,把release 5 (Tikanga) 替換成 release 4 (Tikanga)
Oracle啟動後需要重新修改linux版本為Redhat 5

------------------------------------------------------------------------
訪問控制列表(逐一輸入)
# export DISPLAY=:0.0
# xhost local:oracle


------------------------------------------------------------------------
# gunzip 10201_database_linux_x86_64.cpio.gz
# cpio -idmv < 10201_database_linux_x86_64.cpio

------------------------------------------------------------------------
# su - oracle
# vi ~/.bash_profile
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

------------------------------------------------------------------------
VNC中進行如下操作
# su - oracle
$ cd oracle
$ ./runInstaller.sh
選擇高階安裝Advanced Installation
選擇Custom安裝
選定perform. type configuration
Custom Database
Specify Flash recovery Area
注意字符集:
Character Sets: WE8ISO8859P1-ISO 8859-1 West European
National Character set: AL16UTF16-Unicode UTF-16 Universal character set

------------------------------------------------------------------------
vi /etc/oratab 直接把orcl:/oracle/app/oracle/product/10.2.0/db 1:N改為Y

------------------------------------------------------------------------
如果配置開機啟動,可使用/oracle/app/oracle/product/10.2.0/db_1/bin/目錄下的啟動停止檔案
啟動:
#./dbstart
停止:
#./dbshut

-- The End --

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-607408/,如需轉載,請註明出處,否則將追究法律責任。

相關文章