oracle 11g grid軟件安裝[20180121]


 
實驗環境:
    系統->Redhat 6.5
    Oracle軟件版本->oracle 11.2.0.4.0
    
 
系統初始化
    設定hosts主機名和對應IP地址
        vi /etc/hosts
            192.168.139.11 t-redhat-02 t-redhat-02.com
    關閉selinux
        vi /etc/selinux/config
        #SELINUX=enforcing
        SELINUX=disabled
    關閉防火牆和自動
        service iptables stop&&service ip6tables stop
        chkconfig iptables off&&chkconfig ip6tables off
    更新系統內核參數
        vim /etc/sysctl.conf
            #ADD
#kernel.shmmax ->use os default no change
# shmmax: Smallest of -> (Half the size of the physical memory) or (4GB - 1 byte)
#kernel.shmall ->use os default no change
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 142
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65000
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default =262144
net.core.wmem_max = 1048576
 
 
        限制oracle&grid用戶進程數和文件數
        vim /etc/security/limits.conf
oracle          soft     nproc           2047
oracle          hard     nproc           16384
oracle          soft     nofile          1024
oracle          hard     nofile          65536
 
grid             soft         nproc         2047
grid             hard         nproc         16384
grid             soft          nofile         1024
grid             hard         nofile         65536
 
vim /etc/pam.d/login
    session    required     pam_limits.so
 
 
vim /etc/profile
 
  if [ /$USER = "oracle" ] || [ /$USER = "grid" ]; then
            if [ /$SHELL = "/bin/ksh" ]; then
                ulimit -p 16384
                ulimit -n 65536
            else
                ulimit -u 16384 -n 65536
            fi
                umask 022
          fi
   創建grid和oracle用戶
        groupadd -g 501 oinstall
        groupadd -g 502 dba
        groupadd -g 503 osasm
        groupadd -g 504 asmoper
 
        useradd -g oinstall -G osasm,asmoper grid
        useradd -g oninstall -G dba oracle
 
    更新grid和oracle用戶環境變量
        vim /home/grid/.bash_profile
            export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/ 11.2.0.4/dbhome_1
            export GRID_HOME=/u01/app/grid/product/11.2.0.4
             export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$ORACLE_HOME/OPatch:$PATH
 
  vim /home/oracle/.bash_profile
    
           export  ORACLE_BASE=/u01/app/oracle;
           export ORACLE_HOME=$ORACLE_BASE/product/ 11.2.0.4/dbhome_1
           export PATH=$ORACLE_HOME/bin:$PATH
 
 
 
安裝所需依賴包
        yum -y install binutils
yum -y install compat-libcap1
yum -y install compat-libstdc++*
yum -y install libgcc
yum -y install libgcc
yum -y install libstdc++
yum -y install libstdc++-devel
yum -y install sysstat
yum -y install gcc
yum -y install gcc-c++
yum -y install ksh
yum -y install make
yum -y install glibc
yum -y install glibc-devel
yum -y install libaio
yum -y install libaio-devel
yum -y install elfutils-libelf
yum -y install elfutils-libelf-devel
yum -y install glibc-common
yum -y install glibc-headers
yum -y install expat
           rpm -vih pdksh-5.2.14-30*
 
    為grid和oracle軟件創建目錄
        mkdir -p /u01/app/grid/product/11.2.0.4
        mkdir -p /u01/app/oraInventory
        mkdir -p /u01/app/oracle
    分別為目錄進行授權
        chown -R grid.oinstall /u01/app/grid
        chown -R oracle.oinstall /u01/app/oracle
        chown -R grid.oinstall /u01/app/oraInventory
        chmod -R 775 /u01/app/grid /u01/app/oracle  /u01/app/oraInventory
 
 首先安裝grid軟件

 

只安裝grid軟件

 

 

 

 

 

 
配置RAC
    cd $GRID_HOME/crs/config
    ./config.sh
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM