oracle 11g RAC 安裝前準備指令碼

來源:互聯網
上載者:User

 #!/bin/bash

#writed by sery 2012-05-16 ##########################################install depending packages             ##########################################yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh numactl-devel glibc-headers #########################################add groups,user and create dir        #########################################/usr/sbin/groupadd -g 501 oinstall/usr/sbin/groupadd -g 502 dba/usr/sbin/groupadd -g 504 asmadmin/usr/sbin/groupadd -g 506 asmdba/usr/sbin/groupadd -g 507 asmoper useradd -u 1000 -g oinstall -G dba,asmdba oracleuseradd -u 1006 -g oinstall -G asmadmin,asmdba,asmoper grid mkdir /u01/app/chown -R grid:oinstall /u01/app/chmod -R 775 /u01/app/ mkdir -p /u01/app/oraInventorychown -R grid:oinstall /u01/app/oraInventorychmod -R 775 /u01/app/oraInventory mkdir -p /u01/app/gridmkdir -p /u01/app/oracle chown -R grid:oinstall /u01/app/gridchown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01/app/oraclechmod -R 775 /u01/app/grid ###############################################modify  sysctl.conf                         ###############################################cat >> /etc/sysctl.conf <<donefs.file-max = 6815744kernel.shmall = 2097152#kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 1048576done sysctl -p ################################################modify  /etc/security/limits.conf            ################################################cat >> /etc/security/limits.conf << donegrid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536done #################################################modify /etc/pam.d/login                       #################################################echo "session    required     pam_limits.so">>/etc/pam.d/login ################################################# setting user oracle env                      #################################################cat >> /home/oracle/.bash_profile <<doneexport ORACLE_SID=db4zch_2export ORACLE_UNQNAME=db4zch_2export ORACLE_base=/u01/app/oracleexport ORACLE_HOME=/u01/app/oracle/product/11.2.0export PATH=$ORACLE_HOME/bin:$PATHdone ################################################setting user grid env                        ################################################cat >> /home/grid/.bash_profile <<doneexport ORACLE_SID=+asm2export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=/u01/app/gridexport PATH=$ORACLE_HOME/bin:$PATHdone

本文出自 “sery” 部落格,請務必保留此出處http://sery.blog.51cto.com/10037/878370

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.