按照online文件在Linux下安裝Oracle 10g RAC(一. 環境準備)

hooca發表於2014-10-29
OS:Enterprise 4u8 64bit
Oracle 10g R2


參考:
http://docs.oracle.com/cd/B19306_01/install.102/b14203/prelinux.htm#BABFDGHJ

首先,準備好網路、主機名、儲存等相關配置,以下會跳過相關程度不大的步驟

2.4 建立使用者和組

要確保每個節點的使用者和組有相同的UID和GID

點選(此處)摺疊或開啟

  1. groupadd oinstall
  2. groupadd dba
  3. groupadd oper

  4. useradd -u 200 -g oinstall -G dba,oper oracle

  5. passwd oracle
配置使用者等效性

以oracle使用者登入

點選(此處)摺疊或開啟

  1. mkdir ~/.ssh
  2. chmod 700 ~/.ssh

  3. ssh-keygen -t rsa

  4. ssh-keygen -t dsa

  5. #在所有節點完成後繼續以下
  6. touch ~/.ssh/authorized_keys
  7. cd ~/.ssh
  8. ssh node1 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys

  9. ssh node1 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys
  10. ssh node2 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys

  11. ssh node2 cat /home/oracle/.ssh/id_dsa.pub >>authorized_keys

  12. scp authorized_keys node2:/home/oracle/.ssh/

在所有節點上配置完後,驗證:

點選(此處)摺疊或開啟

  1. ssh node1 date
  2. ssh node2 date
2.5 配置使用者環境變數


點選(此處)摺疊或開啟

  1. vi .bash_profile

  2. export ORACLE_SID=racdb
  3. export ORACLE_BASE=/u01/app/oracle
  4. export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
  5. export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
  6. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
  7. export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  8. export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin/:/usr/local/bin:/usr/X11R6/bin:$PATH
  9. export NLS_LANG='american_america.zhs16gbk'
  10. export NLS_DATE_FORMAT='dd-mm-yy hh24:mi:ss'
  11. export ORACLE_TERM=vt100
  12. export LANG="en_US.UTF-8"



2.7 配置/etc/hosts


vi /etc/hosts

點選(此處)摺疊或開啟

  1. 192.168.226.11  node1.demo.com  node1
    192.168.226.12  node2.demo.com  node2
  2. 192.168.226.111 node1-vip.demo.com node1-vip
  3. 192.168.226.112 node2-vip.demo.com node2-vip
  4. 10.1.1.11 node1-priv.demo.com node1-priv
  5. 10.1.1.12 node2-priv.demo.com node2-priv

2.9 軟體包安裝

點選(此處)摺疊或開啟

  1. yum list \
  2. binutils \
  3. compat-db \
  4. control-center \
  5. gcc \
  6. gcc-c++ \
  7. glibc \
  8. glibc-common \
  9. gnome-libs \
  10. libstdc++ \
  11. libstdc++-devel \
  12. make \
  13. ocfs2console \
    ocfs2-tools \
    ocfs2-2.6.9-89.0.0.0.1.ELsmp \
2.11 系統l引數調整

vi /etc/sysctl.conf

如果系統預設值更大,則選取更大的

點選(此處)摺疊或開啟

  1. kernel.shmall = 2097152

  2. kernel.shmmax = 2147483648

  3. kernel.shmmni = 4096

  4. kernel.sem = 250 32000 100 128

  5. fs.file-max = 65536

  6. net.ipv4.ip_local_port_range = 1024 65000

  7. net.core.rmem_default = 262144

  8. net.core.rmem_max = 1048576

  9. net.core.wmem_default = 262144

  10. net.core.wmem_max = 1048576

sysctl -p

vi /etc/security/limits.conf


點選(此處)摺疊或開啟

  1. oracle soft nproc 2047

  2. oracle hard nproc 16384

  3. oracle soft nofile 1024

  4. oracle hard nofile 65536

vi /etc/pam.d/login


點選(此處)摺疊或開啟

  1. session required /lib/security/pam_limits.so
vi /etc/profile

點選(此處)摺疊或開啟
  1. if [ $USER = "oracle" ]; then
  2.         if [ $SHELL = "/bin/ksh" ]; then
  3.               ulimit -p 16384
  4.               ulimit -n 65536
  5.         else
  6.               ulimit -u 16384 -n 65536
  7.         fi
  8. fi

2.14 軟體安裝目錄


點選(此處)摺疊或開啟

  1. mkdir -p /u01/app/oracle/product/crs
  2. mkdir -p /u01/app/oracle/product/10.2.0/db_1
2.15 改目錄許可權

點選(此處)摺疊或開啟
  1. chown -R oracle:oinstall /u01/app/oracle
  2. chmod -R 775 /u01/app/oracle
2.17 配置Hangcheck-timer

vi /etc/modprobe.conf

點選(此處)摺疊或開啟

  1. options hangcheck-timer hangcheck_tick=1 hangcheck_margin=10

點選(此處)摺疊或開啟

  1. modprobe -v hangcheck-timer
  2. lsmod | grep hang






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

相關文章